> library(sparklyr)
> sc <- spark_connect(master = "yarn-client", spark_home = Sys.getenv('SPARK_HOME'))
sc
connection to use spark from R > spark_disconnect(sc)
start_jupyter
spark-submit --class sparklyr.Shell '/opt/cesga/anaconda/Anaconda2-2018.12-sparklyr/lib/R/library/sparklyr/java/sparklyr-2.4-2.11.jar' 8880 1234 --batch example_sparklyr_script.R