Articles

Affichage des articles du juin, 2017

Install R 3.4.1 and Rstudio on ubuntu 16.04 LTS

It is now available using apt-get. Install R 3.4.1 on ubuntu 16.04 LTS cd $HOME wget https://cran.rstudio.com/src/base/R-3/R-3.4.1.tar.gz tar xvf R-3.4.1.tar.gz cd R-3.4.1 sudo apt-get install gcc  fort77  aptitude sudo aptitude install g++ sudo aptitude install xorg-dev sudo aptitude install libreadline-dev sudo aptitude install gfortran gfortran --version sudo apt install libpcre3-dev  liblzma-dev  libbz2-dev sudo add-apt-repository ppa:webupd8team/java -y sudo apt-get update sudo apt-get install oracle-java8-installer sudo apt-get install oracle-java8-set-default sudo apt-get install texlive-base sudo apt-get install texinfo sudo apt-get install  texlive-fonts-extra sudo apt-get install libcurl4-openssl-dev sudo apt-get install libcairo2-dev libpng-dev zlib1g-dev libpixman-1-dev libxt-dev java -version # need to build shared library (--enable-R-shlib) # the --enable-R-shlib option is needed for the RStudio IDE to work sudo ./configure --enable-R-shlib       sudo make sudo make

Install ou update RcppArmadillo package in MacOSX Sierra

If the update is done with clang++ installed with Xcode, installation will fail. You must install a specific version of clang++. First install homebrew, using in terminal: /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" Then install llvm brew install --with-clang llvm Then, you will find clang++ on /usr/local/opt/llvm/bin/clang++. You can add these lines in the .profile: PATH="/usr/local/opt/llvm/bin:${PATH}" export PATH Run R in terminal, and in R, enter: install.packages("RcppArmadillo") The correct clang++ will be find and compilation works. Note that different versions of clang++ are used if you run RStudio or R in terminal: In RStudio: > system("clang++ --version") Apple LLVM version 8.1.0 (clang-802.0.42) Target: x86_64-apple-darwin16.6.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin In R