ds.mutate.Rd
DataSHIELD implementation of dplyr::mutate
.
ds.mutate(
df.name = NULL,
tidy_select = NULL,
newobj = NULL,
.keep = "all",
.before = NULL,
.after = NULL,
datasources = NULL
)
Character specifying a serverside data frame or tibble.
List of tidyselect syntax to be passed to dplyr::mutate.
Character specifying name for new server-side data frame.
Control which columns from .data are retained in the output. Grouping columns and columns created by ... are always kept. "all" retains all columns from .data. This is the default. "used" retains only the columns used in `tidy_select` to create new columns. "unused" retains only the columns not used in `tidy_select` to create new columns. This is useful if you generate new columns, but no longer need the columns used to generate them. "none" doesn't retain any extra columns from `df.name`. Only the grouping variables and columns created by `tidy_select` are kept.
<tidy-select> Optionally, control where new columns should appear (the default is to add to the right hand side). See `relocate` for more details.
<tidy-select> Optionally, control where new columns should appear (the default is to add to the right hand side). See `relocate` for more details.
datashield connections object.
An object with the name specified by the newobj
argument is written serverside.
if (FALSE) {
## First log in to a DataSHIELD session with mtcars dataset loaded.
ds.mutate(
df.name = "mtcars",
tidy_select = list(mpg_trans = cyl * 1000, new_var = (hp - drat) / qsec),
newobj = "df_with_new_cols"
)
## Refer to the package vignette for more examples.
}