R Installation in Prerequisites (guide)
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.1k
- Forks
- 564
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 29
Description
Hi, I was following the instruction to install R from the prerequisites section in Installation Guide, and I found that automatically, centos 7 will install version 3.6 of R.
The problem is, package rjson and DescTools are not available for R version 3.6. But i still be able to install rjson using this command :
install.packages("https://cran.r-project.org/src/contrib/Archive/rjson/rjson_0.2.20.tar.gz", repos = NULL, type="source")
but i'm not able to install Desctools using same method :
install.packages("https://cran.r-project.org/src/contrib/Archive/DescTools/DescTools_0.99.31.tar.gz", repos = NULL, type="source", dependencies = TRUE)
because some of dependency packages are not available for those R distribution :
ERROR: dependencies ‘mvtnorm’, ‘expm’, ‘Rcpp’, ‘BH’ are not available for package ‘DescTools’
- removing ‘/usr/lib64/R/library/DescTools’
Warning message:
In install.packages("https://cran.r-project.org/src/contrib/Archive/DescTools/DescTools_0.99.31.tar.gz", :
installation of package ‘/tmp/RtmpCz0tUv/downloaded_packages/DescTools_0.99.31.tar.gz’ had non-zero exit status
So i tried to install newer version of R using these commands :
Enable the Extra Packages for Enterprise Linux (EPEL) repository
sudo yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
On RHEL 7, enable the Optional repository
sudo subscription-manager repos --enable "rhel-*-optional-rpms"
Download and install R
export R_VERSION=4.3.2
curl -O https://cdn.rstudio.com/r/centos-7/pkgs/R-${R_VERSION}-1-1.x86_64.rpm
sudo yum install R-${R_VERSION}-1-1.x86_64.rpm
Verify installation
/opt/R/${R_VERSION}/bin/R --version
Create symlink to R
sudo ln -s /opt/R/${R_VERSION}/bin/R /usr/local/bin/R
sudo ln -s /opt/R/${R_VERSION}/bin/Rscript /usr/local/bin/Rscript
When im using root user when installing newer R version, i need to put the R binary into PATH :
Create symlink to R
sudo ln -s /opt/R/${R_VERSION}/bin/R /usr/bin/R
sudo ln -s /opt/R/${R_VERSION}/bin/Rscript /usr/bin/Rscript
When installing DescTools, there are some error appears like this : Error: package ‘###’ was installed before R 4.0.0: please re-install it
This is because default the installation wrongly call the library directory.
In order to install DescTools packages, some libraries are depend on openssl, make sure that openssl are installed in the server. If not, install it :
yum install openssl-devel
So i need to install R packages mentioned in prerequisites :
install.packages("R2HTML", repos="https://cloud.r-project.org/", lib="/opt/R/4.3.2/lib/R/library" )
install.packages("rjson", repos="https://cloud.r-project.org/", lib="/opt/R/4.3.2/lib/R/library" )
for installing DescTools package, we need to install BH Package first :
install.packages("BH")
and because of compatibility issue of GCC for R version >4.3.0 , we need to install Desc tools by this way :
install.packages("https://cran.r-project.org/src/contrib/Archive/DescTools/DescTools_0.99.50.tar.gz", repos = NULL, type="source", dependencies = TRUE)
then continue installing other packages :
install.packages("Rserve", repos="https://cloud.r-project.org/", lib="/opt/R/4.3.2/lib/R/library" )
install.packages("haven", repos="https://cloud.r-project.org/", lib="/opt/R/4.3.2/lib/R/library" )
Hope this short notes can help anybody else who tried to install R for Dataverse software.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Installation Guide's prerequisites section and compare its current R setup with the CentOS 7 and R 4.3.2 commands described here. Done means the guide accurately explains an installation path for the required R packages, including the library location and openssl-devel requirement, without the reported R 3.6 dependency failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- Half a day
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100