DataFrame: DataFrame and methods

Description Usage Arguments Details See Also Examples

View source: R/DataFrame.R

Description

This is a 'data.table' like implementation of a data.frame. dplyr is used as backend. The only purpose is to have R CMD check friendly syntax.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
DataFrame(...)

as.DataFrame(x, ...)

## Default S3 method:
as.DataFrame(x, ...)

## S3 method for class 'data.frame'
as.DataFrame(x, ...)

## S3 method for class 'DataFrame'
x[i, j, ..., by, sby, drop]

Arguments

...

arbitrary number of args
in [ (TwoSidedFormulas)
in constructor see data_frame

x

(DataFrame | data.frame)

i

(logical | numeric | integer | OneSidedFormula | TwoSidedFormula | FormulaList) see the examples.

j

(logical | character | TwoSidedFormula | FormulaList | function) character beginning with '^' are interpreted as regular expression

by, sby

(character) variable names used in group_by. Using 'sby' triggers a summarise.

drop

(ignored) never drops the class.

Details

OneSidedFormula is always used for subsetting rows.

TwoSidedFormula is used instead of name-value expressions in summarise and mutate.

See Also

mutar, FL

Examples

1
2
3
4
data("airquality")
dat <- as.DataFrame(airquality)
dat[~ Month > 4, ][meanWind ~ mean(Wind), sby = "Month"]["meanWind"]
dat[FL(.n ~ mean(.n), .n = c("Wind", "Temp")), sby = "Month"]

wahani/dat documentation built on Jan. 22, 2018, 10:19 p.m.