Converts R data.frame or list into SparkDataFrame.
UsagecreateDataFrame(data, schema = NULL, samplingRatio = 1, numPartitions = NULL)
as.DataFrame(data, schema = NULL, samplingRatio = 1, numPartitions = NULL)
Arguments
a list or data.frame.
a list of column names or named list (StructType), optional.
Currently not used.
the number of partitions of the SparkDataFrame. Defaults to 1, this is limited by length of the list or number of rows of the data.frame
createDataFrame since 1.4.0
as.DataFrame since 1.6.0
Examplesif (FALSE) { # \dontrun{
sparkR.session()
df1 <- as.DataFrame(iris)
df2 <- as.DataFrame(list(3,4,5,6))
df3 <- createDataFrame(iris)
df4 <- createDataFrame(cars, numPartitions = 2)
} # }
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4