Installing R and RStudio on OpenSUSE Leap 42.1

Installing R

To install R we should open software manager: “Main menu -> System -> YaST -> Software -> Software Management”, type R-base in the search field, then click on the “Search” button, mark checkboxes for R-base and R-base-devel packages and click on the “Accept” button:

R-base

For correct installation of additional packages we should previously install the GNU C and C++ compilers, in our case 4.8-8.4 version:

gcc.png

If we will work with XML documents we should also install libxml2-devel package:

libxml2

Installing RStudio

Open RStudio download page and choose appropriate installer, for example RStudio 0.99.489 – Fedora 19+/RedHat 7+/openSUSE 13.1+ (64-bit), then download file rstudio-0.99.489-x86_64.rpm, in our case. When file will be downloaded, open Konsole (or Terminal) go to the directory with that file and type a command

sudo zypper install rstudio-0.99.489-x86_64.rpm

zypper

When the installation process will be finished we can open RStudio IDE with “Main menu -> Development -> RStudio”:

devmenu

After running the RStudio main window should look like one:

rstudio

Advertisements

Установка R и RStudio в OpenSUSE Leap 42.1

Установка R

Для установки R открываем менеджер программ: “Main menu -> System -> YaST -> Software -> Software Management”, в поле поиска набираем R-base, нажимаем кнопку “Search”, затем отмечаем пакеты R-base и R-base-devel и нажимаем кнопку “Accept”:

R-base

Для установки дополнительных пакетов из репозитория R следует установить компиляторы GNU C и C++, в нашем случае версии 4.8-8.4:

gcc.png

Для корректной установки пакетов XML и xml2 также предварительно следует установить библиотеку libxml2-devel:

libxml2

Установка Rstudio

Заходим на страницу загрузки RStudio, выбираем соответствующий вариант установки, например RStudio 0.99.489 – Fedora 19+/RedHat 7+/openSUSE 13.1+ (64-bit), и скачиваем файл – в нашем случае rstudio-0.99.489-x86_64.rpm. После окончания загрузки открываем терминал, переходим в директорию, в которой находится файл и выполняем команду

sudo zypper install rstudio-0.99.489-x86_64.rpm

zypper

После окончания установки открываем RStudio IDE с помощью команды меню “Main menu -> Development -> RStudio”:

devmenu

После открытия главное окно RStudio должно выглядеть примерно так:

rstudio

Installing swirl on Fedora 22

swirl is an R package that turns the R console into an interactive learning environment. Here there are instructions to install swirl on Linux, but they have been tested only on Ubuntu and its derivatives.  Although an installing swirl on Fedora follows the same instructions in general, there are some differences.

1. Install the most recent version of R

The latest version of R is in standard Fedora repository, so we can install it using Yum Extender or a command

$ sudo dnf install R
// or for versions of Fedora before Fedora 22
$ sudo yum install R

When the installation will be finished we can confirm that we have the last version  of R with the command

$ R --version

2. Get RStudio

We can download the recent version of RStudio from https://www.rstudio.com/products/rstudio/download/

3. Install libcurl

libcurl is required for the RCurl package, which swirl uses to download courses from the internet. We can install libcurl using Yum Extender or a command

$ sudo dnf install libcurl 
$ sudo dnf install libcurl-devel

4. Install and run swirl

From command line of R or RStudio we can install and run swirl

> install.packages("swirl")
> library(swirl)
> swirl()