dplyr | R Documentation |
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
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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.