To build SparkR on Windows, the following steps are required
PATH.JAVA_HOME in the system environment variables.bin directory in Maven in PATH.MAVEN_OPTS as described in Building Spark.cmd) in the Spark directory and run mvn -DskipTests -Psparkr package