After upgrading my Mac to Yosemite, I am not able to use git in RStudio anymore.
(I can still use source tree or git independently from RStudio)
Not sure whether it is related to the PATH issue posted here:
Running system command from R console cannot locate installed programs since upgrading to Mac OSX 10.10
I tried the above solution, but did not work.
In RStudio, I specified the path to Git in Tools/Global Options.../"Git/SVN" correctly (as I used before)
But, in in Tools/Project Options.../"Git/SVN":Version control system the only option left is (None).
RStudio: 0.98.1074 (updated to 0.98.1083, still does not work)
version
_
platform x86_64-apple-darwin10.8.0
arch x86_64
os darwin10.8.0
system x86_64, darwin10.8.0
status
major 3
minor 1.0
year 2014
month 04
day 10
svn rev 65387
language R
version.string R version 3.1.0 (2014-04-10)
nickname Spring Dance
I encountered the same problem. When you enter the directory you used to use with git in your terminal (cd path/to/directory) type git status. In my case I received the message:
Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo.
Apparently, I had to agree to the Xcode licence. When you re-run the line with sudo (sudo git status) and enter your password in the terminal you get the whole license displayed. Now you only need to type agree and everything is done. Re-start RStudio and the git functionality is back again.
Best wishes,
Marco
Related
Good day one and all.
I have been using RCurl to load https://raw. tables from our GitHub repository for data cleanup and analysis. Recently (maybe two weeks) every script using:
read.csv(text = getURL())
stopped working, throwing an error as such:
Error in function (type, msg, asError = TRUE) : error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
Unfortunately my understanding of SSL and related issues is very limited (I still git using login credentials in bash).
The thing is, on my Debian machine at work, the code executes flawlessly. And upon removing geURL() and sticking to simple read.csv(), even the Windows code works.
Which is fine but I have functions dependent on url.exists() which also get broken and I have been unable to find a replacement for that.
version
_
platform x86_64-w64-mingw32
arch x86_64
os mingw32
system x86_64, mingw32
status
major 4
minor 0.3
year 2020
month 10
day 10
svn rev 79318
language R
version.string R version 4.0.3 (2020-10-10)
nickname Bunny-Wunnies Freak Out
Thank you in advance for anything that might get me closer to a solution.
The problem is, that the RCurl package for Windows is linked to a very old version of curl (7.40). For reasons I do not know, even the most current packages of RCurl still link to that old version.
In order to use a recent version of curl, you have to install RCurl from the source by using https://cran.r-project.org/bin/windows/Rtools/ .
For compiling RCurl you need to install curl with the relevant header files using "Rtools bash" by the following commands:
pacman -Sy
pacman -S mingw-w64-{i686,x86_64}-curl
After that, you can install RCurl from the source:
install.packages("RCurl", type="source)
I go this error when installing R packages like RStan (and anything that depends on it such as brms) and Devtools. Since in the message displayed during the installation, everything before this look normal, I think the failure to install can be boiled down to this:
/Users/lambda/anaconda3/bin/x86_64-apple-darwin13.4.0-ar -rs ../lib/libStanHeaders.a cvodes/src/cvodes/cvodes.o cvodes/src/cvodes/cvodes_io.o cvodes/src/cvodes/cvodea.o cvodes/src/cvodes/cvodea_io.o cvodes/src/cvodes/cvodes_direct.o cvodes/src/cvodes/cvodes_band.o cvodes/src/cvodes/cvodes_dense.o cvodes/src/cvodes/cvodes_diag.o cvodes/src/cvodes/cvodes_spils.o cvodes/src/cvodes/cvodes_spbcgs.o cvodes/src/cvodes/cvodes_spgmr.o cvodes/src/cvodes/cvodes_sptfqmr.o cvodes/src/cvodes/cvodes_sparse.o cvodes/src/cvodes/cvodes_bandpre.o cvodes/src/cvodes/cvodes_bbdpre.o cvodes/src/sundials/sundials_band.o cvodes/src/sundials/sundials_direct.o cvodes/src/sundials/sundials_math.o cvodes/src/sundials/sundials_pcg.o cvodes/src/sundials/sundials_spbcgs.o cvodes/src/sundials/sundials_spgmr.o cvodes/src/sundials/sundials_dense.o cvodes/src/sundials/sundials_iterative.o cvodes/src/sundials/sundials_nvector.o cvodes/src/sundials/sundials_sparse.o cvodes/src/sundials/sundials_spfgmr.o cvodes/src/sundials/sundials_sptfqmr.o cvodes/src/nvec_ser/nvector_serial.o
make: /Users/lambda/anaconda3/bin/x86_64-apple-darwin13.4.0-ar: No such file or directory
make: *** [static] Error 1
ERROR: compilation failed for package ‘StanHeaders’
I got this same error both with Xcode compiler and clang4 compiler; I don't think the problem is with the compiler, but with the thing called ar. BTW, I have installed Rcpp and it works. I have seen others having the same problem when installing RPy2. So what is that ar thing and how to fix it?
R version:
> version
_
platform x86_64-apple-darwin13.4.0
arch x86_64
os darwin13.4.0
system x86_64, darwin13.4.0
status
major 3
minor 4.2
year 2017
month 09
day 28
svn rev 73368
language R
version.string R version 3.4.2 (2017-09-28)
nickname Short Summer
I just faced the same problem and I am using anaconda's Rstudio.
My way to fixed it is to install it in terminal, first to try these two on your terminal.
>conda install -c mittner r-rstan
>conda install -c r r-stanheaders #to install the packages in terminal
although I'm not sure where was wrong but it did work fine on me.
hope it helps.
// In the end it seems that there's something wrong with my Anaconda-Navigator, I reinstalled a RStudio and it goes fine.
I had the same problem with Rstudio from anaconda3. Then I from the anaconda navigator (Environments) I installed the gfortran_osx-64 package.
This got me the x86_64-apple-darwin15.5.0-gfortran binary under /anaconda3/bin.
Making a symbolic link did the trick:
elisa#~>ln -s /anaconda3/bin/x86_64-apple-darwin13.4.0-gfortran /anaconda3/bin/x86_64-apple-darwin1
I already solved this problem. I got this problem when using RStudio inside Anaconda. Later I installed R 3.4.3 and RStudio outside Anaconda and everything went smoothly. It might have been some problem with the Anaconda RStudio.
I am attempting to compile my R package, and realized that I have multiple versions of R installed on my mac, which is giving me difficulty. When I run 'which R' from terminal, I receive this:
Home$ which R
/Users/Home/anaconda2/bin/R
Home$ R
R version 3.2.2 (2015-08-14) -- "Fire Safety"
However, when I launch RStudio from my applications folder, and type 'version' in the console, I get this:
> version
_
platform x86_64-apple-darwin13.4.0
arch x86_64
os darwin13.4.0
system x86_64, darwin13.4.0
status
major 3
minor 3.2
year 2016
month 10
day 31
svn rev 71607
language R
version.string R version 3.3.2 (2016-10-31)
nickname Sincere Pumpkin Patch
So I have 3.3.2 on RStudio (the version I want for compiling my package), and 3.2.2 from anaconda being launched in terminal when I type R in terminal.
How can I fix this? Do I have to change my path to find the correct version of R when I launch from terminal? How do I find the correct path?
Thanks!
I bet anaconda has just inserted its path at the front of your PATH variable and is overriding your newer 3.3.2 version at the terminal. If you want your 'RStudio' version to be the default version that pops up at your terminal when you type 'R', then you gotta modify your PATH. No biggie.
First, figure out which R version RStudio points to. Type the following into your RStudio console:
Sys.which("R")
I bet you'll see something like /usr/local/bin/R. So that's what you have to add to the front of your PATH (minus the '/R').
To confirm that anaconda has messed you up, open up your terminal and check out your PATH:
echo $PATH
You'll probably see /Users/YOURNAME/anaconda2/bin as the first entry in your PATH, and further down you'll see /usr/local/bin. We have to flip this order. There are a million ways to fix this. Here's the quick and dirty solution -- add the following to the bottom of your .bash_profile
export PATH="/usr/local/bin:$PATH"
And type R --version in your terminal to confirm that your default R has changed.
You might get fancy later with sed or awk if having two /usr/local/bin entries in your PATH annoys you (as it would me).
First go to the directory /Library/Frameworks/R.framework/Versions
Here you should see various versions of R that you have installed.
To change to say version 3.4 use the following sequence of commands in the Terminal:
cd /Library/Frameworks/R.framework/Versions
unlink Current
ln -s 3.4 Current
I highly recommend RSwitch. It's a tiny program that allows you to select from any installed R version, press one button, restart your R session and you'll be using the selected R version.
I recently updated my macbook to macOS Sierra (Version 10.12.3 (16D32)), and I am no longer able to run R directly from Terminal:
DN51ssqi:~ kjytay$ R
-bash: R: command not found
DN51ssqi:~ kjytay$ R --version
-bash: R: command not found
Opening R from the Applications folder or from RStudio works fine. Anyone experience this issue/has been able to fix it?
Here is my R version information:
platform x86_64-apple-darwin13.4.0
arch x86_64
os darwin13.4.0
system x86_64, darwin13.4.0
status
major 3
minor 3.2
year 2016
month 10
day 31
svn rev 71607
language R
version.string R version 3.3.2 (2016-10-31)
nickname Sincere Pumpkin Patch
This is just a guess, but I'm thinking this is probably an issue with your PATH settings, which might have been overwritten when you upgraded*. Seems worth a try at least. This is from the RStudio support pages**:
R from source (including MacPorts and Homebrew)
When R is installed from CRAN on OS X the R executable is installed at
/usr/bin/R. However, if R is installed directly from source or via a
package manager like MacPorts or Homebrew, then the R executable is
installed to either /usr/local/bin/R (Homebrew) or /opt/local/bin/R
(MacPorts). In order to support these variations, RStudio scans for
the R executable in the following sequence:
/usr/bin/R
/usr/local/bin/R
/opt/local/bin/R
If RStudio is not able to locate R by scanning these locations, it
will fall back to using whatever version of R is located at
/Library/Frameworks/R.framework/.
If RStudio is finding R OK, then you must have it at one of these locations. Make sure these locations are in your $PATH list:
In the Terminal:
echo $PATH
Will display your current PATHs list. If any of the locations in the RStudio quote are missing, you can see if that's where R is located by trying to specify that location. For example:
/usr/local/bin/R
If that works to start R, just add that location to your PATHs list:
export PATH=$PATH:/usr/local/bin
So that OSX knows where to find it!
* It's been noted elsewhere that homebrew breaks, for example, on upgrade to Sierra. Here's a blog post outlining some steps an R user might like to take after the upgrade: http://www.statsblogs.com/2017/01/26/upgrading-to-macos-sierra-nee-osx-for-r-users/
** Here's the support page where the quote is from https://support.rstudio.com/hc/en-us/articles/200486138-Using-Different-Versions-of-R
When I attempt to build my package, saber, I get the following error message in the RStudio Compile PDF window.
Unabled to find specified LaTeX program 'pdfLaTeX' on the system path
The R-bloggers post describes the problem I'm experiencing. So I run:
> Sys.which("pdflatex")
pdflatex
""
> Sys.getenv("PATH")
[1] "/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
That second path seems absolutely wrong. The problem is, I'm still in my first year working on a linux-based system and have no idea what to change so that pdfLaTeX is in the path. I admittedly don't spend a lot of time running commands in the terminal, and need some guidance on how to get this fixed so I can build the package without errors. How do I find, then change the PATH so that pdfLaTeX is in the path?
> version
_
platform x86_64-pc-linux-gnu
arch x86_64
os linux-gnu
system x86_64, linux-gnu
status
major 3
minor 1.0
year 2014
month 04
day 10
svn rev 65387
language R
version.string R version 3.1.0 (2014-04-10)
nickname Spring Dance
You need to install texlive. Use this at the command line:
sudo apt-get install texlive
# or if you want all the packages (big install)
sudo apt-get install texlive-full
It will be installed into a location that is already on your path too so you won't need to fiddle with the PATH to get it to work once it's installed.
Get to a terminal and type:
which pdflatex
You'll probably get something like:
/usr/bin/pdflatex
Check if that folder appears in the output of the PATH variable.