Methods for dplyr verbs
methods of dplyr verbs for dfidx objects. Default functions
don't work because most of these functions returns either a
tibble or a data.frame but not a dfidx
## S3 method for class 'dfidx' arrange(.data, ...) ## S3 method for class 'dfidx' filter(.data, ...) ## S3 method for class 'dfidx' slice(.data, ...) ## S3 method for class 'dfidx' mutate(.data, ...) ## S3 method for class 'dfidx' transmute(.data, ...) ## S3 method for class 'dfidx' select(.data, ...)
.data |
a dfidx object, |
... |
further arguments |
These methods always return the data frame column that
contains the indexes and return a dfidx object.
an object of class "dfidx"
Yves Croissant
data("TravelMode", package = "AER")
TM <- dfidx(TravelMode)
select(TM, - wait, - vcost)
mutate(TM, inc2 = income ^ 2, linc = log(income))
transmute(TM, inc2 = income ^ 2, linc = log(income))
arrange(TM, desc(size), income)
filter(TM, income > 35, size <= 2)
pull(TM, income)
slice(TM, c(1:2, 5:7))Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.