Projektarbeit Assistenzsysteme in R
Go to file
2021-12-30 08:32:44 +01:00
dataset Added dataset and available code 2021-12-06 14:27:57 +01:00
lecture Storge changes 2021-12-30 08:32:44 +01:00
project Storge changes 2021-12-30 08:32:44 +01:00
README.md Added R setup to README.md 2021-12-06 12:23:34 +01:00

assistenz-r

Projektarbeit Assistenzsysteme in R

Language R

Setup R on new installation of code-server

To install R on a ned code-server installation, the following command need to be executed. First you should update and upgrade the server.

sudo apt update && sudo apt upgrade -y

Then the needed dependencies should be installed and the R repository should be added to the system.

sudo apt install apt-transport-https software-properties-common
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
sudo add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/'

After these steps are taken, you need to update the apt repositories and install r-base.

sudo apt update && sudo apt install r-base

Install new Packages

First you need to open the R console with root privileges.

sudo -i R

Then you can install new packages.

install.packages("<packagename>")

If an error occured, that a system package was not found, it may has to be installed via apt in the bash console, e.g. for libssl-dev:

sudo apt-get install libssl-dev

Run the shiny server

The server can be started with the following command in the bash console:

Rscript <appname.r>

After starting the server, a message with ip and a random port is printed into the console.

Listening on http://127.0.0.1:6056

To open the website when started in vs-code-server, you have to use the built in subfolder-proxy:

https://code.domain.tld/proxy/<PORT>/

IMPORTANT: Don't forget the last '/', otherwise no ressources can be loaded by the website!