as.data.frame {SparkR}R Documentation

Download data from a SparkDataFrame into a data.frame

Description

This function downloads the contents of a SparkDataFrame into an R's data.frame. Since data.frames are held in memory, ensure that you have enough memory in your system to accommodate the contents.

Usage

as.data.frame(x, row.names = NULL, optional = FALSE, ...)

## S4 method for signature 'SparkDataFrame'
as.data.frame(x, row.names = NULL,
  optional = FALSE, ...)

Arguments

x

a SparkDataFrame

Value

a data.frame

See Also

Other SparkDataFrame functions: SparkDataFrame-class, [[, agg, arrange, attach, cache, collect, colnames, coltypes, columns, count, dapply, describe, dim, distinct, dropDuplicates, dropna, drop, dtypes, except, explain, filter, first, group_by, head, histogram, insertInto, intersect, isLocal, join, limit, merge, mutate, ncol, persist, printSchema, registerTempTable, rename, repartition, sample, saveAsTable, selectExpr, select, showDF, show, str, take, unionAll, unpersist, withColumn, write.df, write.jdbc, write.json, write.parquet, write.text

Examples

## Not run: 
##D 
##D irisDF <- createDataFrame(sqlContext, iris)
##D df <- as.data.frame(irisDF[irisDF$Species == "setosa", ])
## End(Not run)

[Package SparkR version 2.0.0 Index]