Run R Script
Install Packages
We need to install the required package before running the script.
Method 1: run the script install.packages('<package name>')
Method 2: in the menu option Packages, click Install package(s)..., and select the package you want to install
Trouble Shooting
rJava installation error"
Loading required package: rJava
Error: package or namespace load failed for ‘rJava’:
.onLoad failed in loadNamespace() for 'rJava', details:
call: fun(libname, pkgname)
error: JAVA_HOME cannot be determined from the Registry
Error: package ‘rJava’ could not be loaded
Basically, you need to install JAVA (64-bit version should be downloaded manually, since only 32-bit one is installed by default) and set environment variable JAVA_HOME.
Run R Script
Open the script file and select all the source code
Click
, multiple selections available,