Learn R Programming

crunch (version 1.14.4)

deleteSubvariables: Delete subvariables from an array

Description

This function conceals the dirty work in making this happen. The array gets unbound, the subvariables deleted, and then the remaining subvariable are rebound into a new array.

Usage

deleteSubvariables(variable, to.delete, confirm = requireConsent())
deleteSubvariable(variable, to.delete, confirm = requireConsent())

Arguments

variable
the array variable
to.delete
aliases (following crunch.namekey.dataset) or indices of variables to delete.
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).

Value

a new version of variable without the indicated subvariables