textFile {SparkR} | R Documentation |
This function reads a text file from HDFS, a local file system (available on all nodes), or any Hadoop-supported file system URI, and creates an RDD of strings from it.
textFile(sc, path, minSplits = NULL)
sc |
SparkContext to use |
path |
Path of file to read. A vector of multiple paths is allowed. |
minSplits |
Minimum number of splits to be created. If NULL, the default value is chosen based on available parallelism. |
RDD where each item is of type character
## Not run:
##D sc <- sparkR.init()
##D lines <- textFile(sc, "myfile.txt")
## End(Not run)