read.text {SparkR} | R Documentation |
Loads a text file and returns a SparkDataFrame with a single string column named "value". Each line in the text file is a new row in the resulting SparkDataFrame.
read.text(sqlContext, path)
sqlContext |
SQLContext to use |
path |
Path of file to read. A vector of multiple paths is allowed. |
SparkDataFrame
## Not run: sc <- sparkR.init() sqlContext <- sparkRSQL.init(sc) path <- "path/to/file.txt" df <- read.text(sqlContext, path) ## End(Not run)