Learn R Programming

envvar (version 0.1.2)

envvar_get_uuid: Environment variables for UUIDs

Description

envvar_get_uuid() gets a UUID from an environment variable

Usage

envvar_get_uuid(x, default = NULL, validate = NULL, warn_default = TRUE)

Value

An object of the class "UUID" representing a vector of UUIDs.

Arguments

x

String containing an environment variable name

default

Optional default value if the environment variable is not set

validate

Optional function that checks a value for validity

warn_default

Show a warning if the default value is used (default: TRUE)

Examples

Run this code

# Get a file path and make sure it exists
envvar_set("DEMO_GUID" = "d647f20f-c44c-4914-8255-9eca97150d4c")
envvar_get_uuid("DEMO_GUID")

Run the code above in your browser using DataLab