read.text {SparkR}R Documentation

Create a SparkDataFrame from a text file.

Description

Loads text files and returns a SparkDataFrame whose schema starts with a string column named "value", and followed by partitioned columns if there are any.

Usage

## Default S3 method:
read.text(path, ...)

Arguments

path

Path of file to read. A vector of multiple paths is allowed.

...

additional external data source specific named properties.

Details

Each line in the text file is a new row in the resulting SparkDataFrame.

Value

SparkDataFrame

Note

read.text since 1.6.1

Examples

## Not run: 
##D sparkR.session()
##D path <- "path/to/file.txt"
##D df <- read.text(path)
## End(Not run)

[Package SparkR version 2.4.6 Index]