Learn R Programming

teal.reporter (version 0.4.0)

conv_str_logi: Convert yaml representation of a boolean strings to logical Values

Description

Converts a single character string representing a yaml boolean value into a logical value in R.

Usage

conv_str_logi(
  input,
  name = "",
  pos_logi = c("TRUE", "true", "True", "yes", "y", "Y", "on"),
  neg_logi = c("FALSE", "false", "False", "no", "n", "N", "off"),
  silent = TRUE
)

Value

input argument or the appropriate logical value.

Arguments

input

(character(1))

name

(charcter(1))

pos_logi

(character) vector of yaml values which should be treated as TRUE.

neg_logi

(character) vector of yaml values which should be treated as FALSE.

silent

(logical(1)) if to suppress the messages and warnings.

Examples

Run this code
conv_str_logi <- getFromNamespace("conv_str_logi", "teal.reporter")
conv_str_logi("TRUE")
conv_str_logi("True")

conv_str_logi("off")
conv_str_logi("n")

conv_str_logi("sth")

Run the code above in your browser using DataLab