Learn R Programming

crunch (version 1.24.0)

CrunchDataFrame: CrunchDataFrame

Description

CrunchDataFrames are designed to mimic the ways that data.frames are used. They should be a drop-in replacement in many places where data.frames are used.

Usage

# S3 method for CrunchDataFrame
dim(x)

# S3 method for CrunchDataFrame names(x)

# S3 method for CrunchDataFrame [(x, i, j, drop = TRUE)

# S3 method for CrunchDataFrame [(x, i, j) <- value

# S3 method for CrunchDataFrame [[(x, i)

# S3 method for CrunchDataFrame [[(x, i) <- value

# S3 method for CrunchDataFrame $(x, i)

# S3 method for CrunchDataFrame $(x, i) <- value

Arguments

x

a CrunchDataFrame

i

indicators for rows (integers or logicals)

j

indicators for columns (names, integers, or logicals)

drop

logical. If TRUE the result is coerced to the lowest possible dimension. The default is to drop if only one column is left, but not to drop if only one row is left.

value

value to place (or replace) in the CrunchDataFrame

Details

CrunchDataFrames are generated not by downloading all of the variables from a dataset, but rather only the variables that are needed by subsequent functions. So, if you create a CrunchDataFrame, and then run a linear model using lm(), only the variables used by the linear model will be downloaded.

CrunchDataFrames can be altered (that is: adding more columns, removing columns, subsetting rows, etc.) with the same [, [[, and $ syntax as data.frames.