Skip to main content

Installing R on Ubuntu 19.10


Download R Source code from
https://cran.rstudio.com/index.html

extract the .tar.gz file to a location
gzip -dc R-x.y.z.tar.gz | tar -xf -

current sources for the recommended packages, which can be obtained by rsync or downloaded from CRAN. To use rsync to install the appropriate sources for the recommended packages, run ./tools/rsync-recommended from the top-level directory of the R sources.

Install necessary packages to add repository over HTTPS
sudo apt install apt-transport-https software-properties-common


Add CRAN external repository
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
sudo add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/'

edit /etc/apt/sources.list and remove comments for deb-src for line containing cran35/
(mostly last line of this file)

execute sudo apt-get update to read the sources files.

Install package dependencies using
sudo apt-get build-dep r-base

This step will download a tone of dependencies and may take some time

Now navigate to folder where R is extracted and execute
./configure --prefix=/opt/R/3.6.2 --enable-R-shlib --with-blas --with-lapack

This prepares a make file that installs R under /opt
blas enables to use system libraries rather than R internal libraries. It improves analytics calculation speed.

Output should look like something like this


Execute make comment to execute it
make

finally install it by 
sudo make install

you can optionally create a short cut for it using
sudo ln -s /opt/R/3.6.2/bin/R /bin/R



Comments

Popular posts from this blog

Netbeans 6.0 - Code generation

The Java editor is capable of generating often used constructs for you automatically. Press Alt+Insert to invoke the code generation menu and pick what you want to generate To add import statements: Use error hints : Click on the error mark with the light bulb or press Alt+Enter . It will offer you a list of possible classes to import. Pick the proper hint and you are done Use the import class dialog : Put the caret into the name of an unimported class and press Alt+Shift+I . A list of possible classes to import will appear. Use the smart fix import : Press Ctrl+Shift+I . You will get a dialog that lists all unresolved identifiers in the source. If there is more than one option for resolving the identifier you may choose using the combo box. Classes shown in gray do not fit for some reason. Method exit points : Putting the caret on the return type of a method definition will highlight all places where the method can exit Exception throwing points : Putting the caret on an...

Artist got automated

Here is my first Tensorflow run to convert images to different styles of famous painters I am using the code that is available at  https://github.com/lengstrom/fast-style-transfer It uses specific versions of below libraries !apt install ffmpeg !pip install tensorflow==0.12.1 !pip install numpy==1.11.2 !pip install scipy==0.18.1 !pip install pillow==3.4.2 I started with latest version and that triggered failure after failure. If you are like me, add below changes to their respective files #This is to make tensorflow behave as if it is in v1 File : evaluate.py and ./src/transform.py import tensorflow.compat.v1 as tf tf.disable_v2_behavior() #Image functions are removed from scipy.misc module. so use imageio instead import imageio scipy.misc.imsave(out_path, img) --> imageio.imwrite(out_path, img) img = scipy.misc.imread(src, mode='RGB') --> img = imageio.imread(src, pilmode='RGB') Refer this post on more details on imageio changes Here is the ...

OnePlus 6T - Android 10 (OOS 10)

Its been more than 3 months since August security patch update. Out of curiosity I checked Oxygen Updater. To my surprise, Oxygen OS v 10 (based on Android 10) is available. Since this is a stable release, i went head and updated it. Its ended up being a buggy release. For those of you, who didnt get update over OTA, its better to wait for OOS 10.1. Here are the list of issue and the workarounds. Issue #1 :  Phone randomly restarts and then goes to boot loop Workaround : when the phone stuck in boot loop (with OnePlus logo animation), Press Power Button and Volume Down button to restart it Issue #2 : Google play wont work Work Around : Booting to recovery and clearing cache is expected to fix this. will update after testing To booting to recovery, Firstly, turn off your phone: press and hold the Power button for a while or press the Power key once and choose ‘power off’. Once the switch off process is completed start pressing and also holding down the Volume Dow...