Skip to content

Instantly share code, notes, and snippets.

@shivaram
Created July 15, 2015 18:17
Show Gist options
  • Save shivaram/0fa8acecc47d43d78dfc to your computer and use it in GitHub Desktop.
Save shivaram/0fa8acecc47d43d78dfc to your computer and use it in GitHub Desktop.
Rstudio local setup
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))
@prasannmodi
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment