conv_str_logi {teal.reporter}R Documentation

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
)

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.

Value

input argument or the appropriate logical value.

Examples

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")

[Package teal.reporter version 0.4.0 Index]