Hi all,

I am exploring sparkR by activating the shell and following the tutorial
here https://amplab-extras.github.io/SparkR-pkg/

And when I tried to read in a local file with textFile(sc,
"file_location"), it gives an error could not find function "textFile".

By reading through sparkR doc for 1.4, it seems that we need sqlContext to
import data, for example.

people <- read.df(sqlContext,
"./examples/src/main/resources/people.json", "json"

)
And we need to specify the file type.

My question is does sparkR stop supporting general type file importing? If
not, would appreciate any help on how to do this.

PS, I am trying to recreate the word count example in sparkR, and want to
import README.md file, or just any file into sparkR.

Thanks in advance.

Best,
Wei

Reply via email to