How do you load csv file into SparkR on RStudio? Below are the steps I had to perform to run SparkR on RStudio. I have used read.df to read .csv not sure how else to write t
I appreciate everyone's input and solutions!!! I figured out another way to load .csv file into SparkR RStudio. Here it is:
#set sc
sc <- sparkR.init(master = "local")
sqlContext <- sparkRSQL.init(sc)
#load .csv
patients <- read.csv("C:/...") #Insert your .csv file path
df <- createDataFrame(sqlContext, patients)
df
head(df)
str(df)