DFplyr-package | R Documentation |
S4Vectors::DataFrame
as a dplyr
data sourceAdd dplyr compatibility to S4Vectors::DataFrame
for use with a selection of dplyr verbs.
x |
A |
Maintainer: Jonathan Carroll rpkg@jcarroll.com.au (ORCID)
Useful links:
library(S4Vectors)
library(dplyr)
d <- as(mtcars, "DataFrame")
mutate(d, newvar = cyl + hp)
mutate_at(d, vars(starts_with("c")), ~ .^2)
group_by(d, cyl, am) %>%
tally(gear)
count(d, gear, am, cyl)
select(d, am, cyl)
select(d, am, cyl) %>%
rename2(foo = am)
arrange(d, desc(hp))
rbind(DataFrame(mtcars[1, ], row.names = "MyCar"), d) %>%
distinct()
filter(d, am == 0)
slice(d, 3:6)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.