Learn R Programming

AzureRMR (version 1.0.0)

named_list: Miscellaneous utility functions

Description

Miscellaneous utility functions

Usage

named_list(lst, name_fields = "name")

is_url(x, https_only = FALSE)

is_empty(x)

Arguments

lst

A named list of objects.

name_fields

The components of the objects in lst, to be used as names.

x

For is_url and is_empty, An R object.

https_only

For is_url, whether to allow only HTTPS URLs.

Value

For named_list, the list that was passed in but with names. For is_url, whether the object appears to be a URL (is character of length 1, and starts with the string "http"). Optionally, restricts the check to HTTPS URLs only. For is_empty, whether the length of the object is zero (this includes the special case of NULL).

Details

named_list extracts from each object in lst, the components named by name_fields. It then constructs names for lst from these components, separated by a "/".