Created
July 15, 2015 18:17
-
-
Save shivaram/0fa8acecc47d43d78dfc to your computer and use it in GitHub Desktop.
Rstudio local setup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sys.setenv(SPARK_HOME="/Users/shivaram/spark-1.4.1") | |
.libPaths(c(file.path(Sys.getenv("SPARK_HOME"), "R", "lib"), .libPaths())) | |
library(SparkR) | |
sc <- sparkR.init(master="local") | |
sqlContext <- sparkRSQL.init(sc) | |
df <- createDataFrame(sqlContext, faithful) | |
# Select one column | |
head(select(df, df$eruptions)) | |
# Filter out rows | |
head(filter(df, df$waiting < 50)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello Shivaram,
Hope you are doing well. I have an issue related to SparkR, want to build stepwise glm() model. Is in SparkR any function is there to build that model. I'm using SPARK 2.0 and R 3.3.1.
Thanks & Regards,
Prasann modi