Learn R Programming

rJavaEnv (version 0.3.0)

rje_consent: Obtain User Consent for rJavaEnv

Description

Get user consent for rJavaEnv to write and update files on the file system. rJavaEnv needs permission to manage files in your project and cache directories to function correctly.

Usage

rje_consent(provided = FALSE)

Value

TRUE if consent is given, otherwise an error is raised.

Arguments

provided

Logical indicating if consent is already provided. To provide consent in non-interactive R sessions use rJavaEnv::rje_consent(provided = TRUE). Default is FALSE.

Details

In line with CRAN policies, explicit user consent is required before making these changes. Please call rJavaEnv::consent() to provide consent.

Alternatively, you can set the following R option (especially useful for non-interactive R sessions):

options(rJavaEnv.consent = TRUE)

The function is based on the code of the renv package. Copyright 2023 Posit Software, PBC License: https://github.com/rstudio/renv/blob/main/LICENSE

Examples

Run this code
if (FALSE) {

# to provide consent and prevent other functions from interrupting to get the consent
rje_consent(provided = TRUE)
}

Run the code above in your browser using DataLab