Hey, everyone. I have 2 questions related to installation of R packages.
I want to install some R packages that may need dev / devel program.
I think these packages need dev program like below.
- install.packages("RCurl") → libcurl4-openssl-dev
- install.packages("png") → libpng-devel
Many people use yum to install these program, but I am using anaconda in linux server, managing all program by conda.
But, I couldn't find dev programs "libcurl4-openssl-dev" & "libpng-devel" in conda.
How should I do ? Would you tell me the instead program of these in conda if there are?
Also, when I tried to install R package "XML", there is error like this
- You are trying to use a version 2.* edition of libxml but an incompatible library.
- The header files and library seem to be mismatched.
- If you have specified LIBXML_INCDIR, make certain to also specify an appropriate LIBXML_LIBDIR if the libxml2 library is not in the default directories.
How shoud I solve this problem.
Thank you.
When using R with conda, some people recommend to install all R packages via conda and not let R install packages. This is because R looks for header files (i.e. dev libraries) in canonical locations where these files are typically located when installed by the OS package manager. For more on R with conda, see this answer on the RStudio forum.
Thank you for your reply. So, when we use R in local, we should use "install.packages(~)" from R. Also, when we use R in anaconda, we can use "conda install ~" from linux. So, in my case, I have to confirm which R I am using now. If I'm using R in anaconda, I should install libraries like Devon Ryan, right ??
For non-compiled packages you can
install.packages()
in both, it's just compiled packages (i.e., those written partially in C/C++/etc.) that are a bit more involved and easier to handle withconda install
.