sweet_dots: Create dots

Description Usage Arguments Value See Also Examples

Description

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.

Usage

 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, ...)

Arguments

.data

data to pass to selects "dots" parameter

...

optional arguments passed to/from other methods

Value

a formula

See Also

Other SE dplyr convenience functions: dots_maker, select_dots

Examples

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")))

darrellpenta/dissertate documentation built on May 14, 2019, 6:10 p.m.