Hi, I want to create average of numerical columns in iris dataset using sparkR
Sys.setenv('SPARKR_SUBMIT_ARGS'='"--packages" "com.databricks:spark-csv_2.10:1.3.0" "sparkr-shell"') library(SparkR) sc=sparkR.init(master="local",sparkHome = "/Users/devesh/Downloads/spark-1.4.1-bin-hadoop2.6",sparkPackages = c("com.databricks:spark-csv_2.10:1.3.0")) # To read csv files #initiating the sql context sqlContext <- sparkRSQL.init(sc) # example of sparkR df <- createDataFrame(sqlContext, iris) *avg(df$Sepal_Length)* *gives me the output -->* *Column avg(Sepal_Length)* *but not a number* -- Warm regards, Devesh.