# R math: help to for installing R packages



## pds21676 (May 13, 2015)

Dears

I have installed R for my daily research activities in FreeBSD 10.1.
However, recurrently I'm unable to install R packages due to problems of compilation. For instance I'm unable to install Rcmdr package to implement an friendlier user GUI.
Do someone has practice of R installation in FreeBSD and its use?
Thank you.
Pedro


----------



## gofer_touch (May 13, 2015)

Why not install R from the packages instead? It should be as simple as `pkg install R`

One suggestion, have you tried rkward -- `pkg install rkward-kde4`? It is a really nice way to use R and is a fully featured GUI that is constantly improving. It requires dependencies from the KDE desktop, but they are fairly minimal.

I also remember using R some time ago and needing to make sure that the directory in which the R packages were being installed into was writable. At least this was the case for rkward. Otherwise you will get error messages saying that the packages can't be installed. This might be solvable by running R/rkward as SU to install the packages and then reverting back to a regular user. Can you post the error messages that you are getting?


----------



## Oko (May 13, 2015)

pds21676 said:


> Dears
> 
> I have installed R for my daily research activities in FreeBSD 10.1.
> However, recurrently I'm unable to install R packages due to problems of compilation. For instance I'm unable to install Rcmdr package to implement an friendlier user GUI.
> ...


You don't have problem installing R packages on FreeBSD. Many important hard to compile packages can be installed using ports for example math/R-cran-xts and similar. Use regular expression 
	
	



```
R-cran*
```
 to search. Easier packages can be installed just like on any other system


```
> install.packages("ggplot2")
```

What you are really asking is how to install your favourite IDE for R on FreeBSD. Quick look

http://socserv.mcmaster.ca/jfox/Misc/Rcmdr/

revels that



> I'm making the GUI available as the Rcmdr package. You can get a copy of the latest released version of the Rcmdr package through CRAN. I should mention that I've only tested the package under Windows 95, 2000, XP; Vista, and 7 (recent versions under Windows 7), and under Ubuntu Linux (earlier versions under Red Hat and Quantian Linux); and under Mac OS X. Mac OS X users in particular (and possibly others) should see the installation notes.



It is pretty clear that you have to use Windows or Ubuntu if you want that particular UI or see if the source code is available and clear it up from OS specific crap that it can be installed on a vanilla UNIX POSIX system.


BTW I use R every day on FreeBSD.


----------



## pds21676 (May 20, 2015)

Thanks a lot for your help Oko and gofer_touch . I will give a look to rkward and follow your suggestions.
Best
Pedro


----------



## gofer_touch (Sep 21, 2015)

Strangely enough now math/rkward-kde4 isn't pre-compiled anymore and compilation fails. Has anyone else managed to get it to compile on FreeBSD 10.2?


----------

