You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: R/README.md
+15-5Lines changed: 15 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,16 @@
1
1
# R on Spark
2
2
3
3
SparkR is an R package that provides a light-weight frontend to use Spark from R.
4
+
### Installing sparkR
5
+
6
+
Libraries of sparkR need to be created in `$SPARK_HOME/R/lib`. This can be done by running the script `$SPARK_HOME/R/install-dev.sh`.
7
+
By default the above script uses the system wide installation of R. However, this can be changed to any user installed location of R by setting the environment variable `R_HOME` the full path of the base directory where R is installed, before running install-dev.sh script.
8
+
Example:
9
+
```
10
+
# where /home/username/R is where R is installed and /home/username/R/bin contains the files R and RScript
11
+
export R_HOME=/home/username/R
12
+
./install-dev.sh
13
+
```
4
14
5
15
### SparkR development
6
16
@@ -30,7 +40,7 @@ To set other options like driver memory, executor memory etc. you can pass in th
30
40
If you wish to use SparkR from RStudio or other R frontends you will need to set some environment variables which point SparkR to your Spark installation. For example
31
41
```
32
42
# Set this to where Spark is installed
33
-
Sys.setenv(SPARK_HOME="/Users/shivaram/spark")
43
+
Sys.setenv(SPARK_HOME="/Users/username/spark")
34
44
# This line loads SparkR from the installed directory
You can also run the unit-tests for SparkR by running (you need to install the [testthat](http://cran.r-project.org/web/packages/testthat/index.html) package first):
58
68
59
69
R -e 'install.packages("testthat", repos="http://cran.us.r-project.org")'
60
70
./R/run-tests.sh
61
71
62
72
### Running on YARN
63
-
The `./bin/spark-submit`and `./bin/sparkR`can also be used to submit jobs to YARN clusters. You will need to set YARN conf dir before doing so. For example on CDH you can run
73
+
The `./bin/spark-submit` can also be used to submit jobs to YARN clusters. You will need to set YARN conf dir before doing so. For example on CDH you can run
0 commit comments