Learn R Programming

crunch (version 1.30.4)

consent: Give consent to do things that require permission

Description

Potentially destructive actions require that you confirm that you really want to do them. If you're running a script and you know that you want to perform those actions, you can preemptively provide consent.

Usage

consent()

with_consent(expr)

Value

consent returns an S3 class "contextManager" object, which you can use with with. with_consent evaluates its arguments inside the consent context.

Arguments

expr

Code to evaluate with consent

See Also

with-context-manager ContextManager

Examples

Run this code
if (FALSE) {
with(consent(), delete(ds))
# Equivalent to:
with_consent(delete(ds))
}

Run the code above in your browser using DataLab