View source: R/S03_Utilities.R
data_first | R Documentation |
A function that ensures the first argument is always for 'data' - allows greater compatibility with the pipe operator.
data_first(data_obj, fun_to_apply, ...)
fun_to_apply |
An R function that has a
|
... |
Additional arguments for the given function. |
data_ob |
An R object to pass to a given
function's |
The associated output for the fun_to_apply
function.
data( 'mtcars' )
lm_fit <- data_first( mtcars, lm, formula = mpg ~ cyl )
print( lm_fit )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.