as.data.frame: Convert a data source or tbl to a data frame

Description Usage Arguments Details See Also Examples

Description

Convert a data source or tbl to a data frame

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## S3 method for class 'RxXdfData'
as.data.frame(x, maxRowsByCols = NULL, row.names = NULL,
  optional = TRUE, ...)

## S3 method for class 'RxDataSource'
as.data.frame(x, maxRowsByCols = NULL,
  row.names = NULL, optional = TRUE, ...)

## S3 method for class 'RxFileData'
x$name

## S3 method for class 'RxFileData'
x[[name, maxRowsByCols = NULL, ...]]

## S3 method for class 'RxFileData'
pull(.data, var = -1)

Arguments

x

A data source object, or tbl wrapping the same.

maxRowsByCols

the maximum dataset size to convert, expressed in terms of rows times columns. Defaults to NULL, meaning no maximum.

row.names, optional

For compatibility with the as.data.frame generic. Not used.

...

Other arguments to rxDataStep.

name

The name of a column to extract from a data source object

Details

These are simple wrappers around rxDataStep, with the check on the maximum table size turned off. You should ensure that you have enough memory for your data.

as.data.frame converts a data source object (typically an Xdf file, but can also be any data source type that rxDataStep supports) into a data frame. The pull, $ and [[ methods extract a single column from a data source, as a vector.

See Also

as.data.frame, collect

Examples

1
2
3
4
5
6
mtx <- as_xdf(mtcars, overwrite=TRUE)
mtx$mpg
mtx[["mpg"]]
pull(mtx, mpg)
as.data.frame(mtx)
as_data_frame(mtx)  # returns a tbl_df

RevolutionAnalytics/dplyrXdf documentation built on June 3, 2019, 9:08 p.m.