Github user napsternxg commented on a diff in the pull request:
https://github.com/apache/spark/pull/10836#discussion_r50224572
--- Diff: R/README.md ---
@@ -1,6 +1,16 @@
# R on Spark
SparkR is an R package that provides a light-weight frontend to use Spark
from R.
+### Installing sparkR
+
+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`.
--- End diff --
I am sorry if my I was not clear before but what I mean is the following:
1. In order for the code `.libPaths(c(file.path(Sys.getenv("SPARK_HOME"),
"R", "lib"), .libPaths()))` to work, the directory `$SPARK_HOME/R/lib` needs to
exist. When we build spark using `build/mvn -DskipTests clean package` this
directory is not created by default. Hence we have to run `install-dev.sh` in
order to use SparkR from an R shell.
Also, if we look at the code in `install-dev.sh`, the following lines
actually create the `lib` directory.
```
FWDIR="$(cd `dirname $0`; pwd)"
LIB_DIR="$FWDIR/lib"
mkdir -p $LIB_DIR
```
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]