Learn R Programming

crunch (version 1.12.2)

deleteVariables: Delete Variables Within a Dataset

Description

Delete Variables Within a Dataset

Usage

deleteVariables(dataset, variables = NULL, pattern = NULL, key = namekey(dataset), confirm = requireConsent(), ...)
deleteVariable(dataset, variables = NULL, pattern = NULL, key = namekey(dataset), confirm = requireConsent(), ...)

Arguments

dataset
the Dataset to modify
variables
names or indices of variables to delete
pattern
optional regular expression to identify Variables to delete. Note that this argument is deprecated. If you wish to grep, you can grep(pattern, aliases(variables(dataset))) or similar outside this function.
key
the Variable attribute to grep with the pattern. Default is "alias"
confirm
logical: should the user be asked to confirm deletion. Default is TRUE if in an interactive session. You can avoid the confirmation prompt if you delete with(consent).
...
optional additional arguments to grep. Likewise deprecated.

Value

(invisibly) dataset with the specified variables deleted

See Also

hide