Description Usage Arguments Value See Also Examples
The function takes a string, a vector, a formula, a list of formulas, or a string representing such a list and "quotes" it for passing to the dplyr functions.
1 2 3 4 5 6 7 8 9 10 11 12 13 | sweet_dots(.data, ...)
## S3 method for class 'character'
sweet_dots(.data, ...)
## S3 method for class 'integer'
sweet_dots(.data, ...)
## S3 method for class 'formula'
sweet_dots(.data, ...)
## Default S3 method:
sweet_dots(.data, ...)
|
.data |
data to pass to selects "dots" parameter |
... |
optional arguments passed to/from other methods |
a formula
Other SE dplyr convenience functions: dots_maker
,
select_dots
1 2 3 4 5 6 7 | # Pass a string
dplyr::select_(iris, .dots = sweet_dots("Sepal.Length"))
dplyr::select_(iris, .dots = sweet_dots("dplyr::matches('Sepal')"))
dplyr::filter_(iris, .dots = sweet_dots("Sepal.Length == 5.1 & Species != 'setosa'"))
# Pass a vector
dplyr::select_(iris, .dots = sweet_dots(c("Sepal.Length","Species")))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.