dh.dropCols | R Documentation |
Often we want to remove variables from a dataframe. This function allows you to specify the variables you either want to remove or keep and and creates a new dataframe with only the required variables.
dh.dropCols(
df = NULL,
vars = NULL,
new_obj = NULL,
type = NULL,
conns = NULL,
checks = TRUE,
new_df_name = NULL
)
df |
Character specifying a server-side data frame. |
vars |
Character vector specifying columns within 'df' to be removed or kept. |
new_obj |
Optionally, character specifying name for new server-side data frame. Default is to return original data frame with columns removed. |
type |
Character specifying how to treat 'vars'. If "remove" these variables are removed from the data frame, if "keep" these variables are kept in the data frame and all others are removed. |
conns |
DataSHIELD connections object. |
checks |
Logical; if TRUE checks are performed prior to running the function. Default is TRUE. |
new_df_name |
Retired argument name. Please use ‘new_obj’ instead. |
Server-side data frame the specified subset of columns.
Other data manipulation functions:
dh.makeAgePolys()
,
dh.makeIQR()
,
dh.makeStrata()
,
dh.quartileSplit()
,
dh.renameVars()
,
dh.tidyEnv()
,
dh.zByGroup()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.