dplyr {dfidx} | R Documentation |
Methods for dplyr verbs
Description
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
Usage
## 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, ...)
Arguments
.data |
a dfidx object, |
... |
further arguments |
Details
These methods always return the data frame column that
contains the indexes and return a dfidx
object.
Value
an object of class "dfidx"
Author(s)
Yves Croissant
Examples
mn <- dfidx(munnell)
select(mn, - gsp, - water)
mutate(mn, lgsp = log(gsp), lgsp2 = lgsp ^ 2)
transmute(mn, lgsp = log(gsp), lgsp2 = lgsp ^ 2)
arrange(mn, desc(unemp), labor)
filter(mn, unemp > 10)
pull(mn, gsp)
slice(mn, c(1:2, 5:7))
[Package dfidx version 0.1-0 Index]