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:
##D sc <- sparkR.init()
##D sqlContext <- sparkRSQL.init(sc)
##D path <- "path/to/file.txt"
##D df <- read.text(sqlContext, path)
## End(Not run)