get_singleValue.Rd
Get a single value from a Rxs tree, list of trees, or full Rxs project object
get_singleValue_fromTree(
x,
entityId,
lookInValueLists = TRUE,
returnDf = FALSE,
flattenVectorsInDf = TRUE,
pathString_regex_flatten = NULL,
pathString_regex_explode = NULL,
fieldname_regex_alwaysFlatten = NULL,
returnLongDf = TRUE,
pathString_regex_select = ".*",
silent = metabefor::opts$get("silent")
)
get_singleValue_fromTreeList(
x,
entityId,
returnDf = TRUE,
nullValue = 0,
naValue = NULL,
lookInValueLists = TRUE,
flattenVectorsInDf = TRUE,
warningValues = list(NULL, NA),
warningFunctions = NULL,
pathString_regex_select = ".*",
pathString_regex_flatten = NULL,
pathString_regex_explode = NULL,
fieldname_regex_alwaysFlatten = NULL,
returnLongDf = TRUE,
silent = metabefor::opts$get("silent")
)
get_singleValue(
x,
entityId,
returnDf = TRUE,
flattenVectorsInDf = TRUE,
returnLongDf = TRUE,
lookInValueLists = TRUE,
pathString_regex_select = ".*",
pathString_regex_flatten = NULL,
pathString_regex_explode = NULL,
fieldname_regex_alwaysFlatten = NULL,
silent = metabefor::opts$get("silent")
)
The tree, tree list, or full Rxs project object.
The entity identifier of the value to get
Whether to also look inside value lists
Whether to return a data frame or not
The default action to apply for values not matching
one of pathString_regex_flatten
and pathString_regex_explode
: to flatten
by default, pass TRUE
; to explode by default, pass FALSE
.
Regular expressions
matched against each entity node's path string (i.e. its path from the root,
delimited by slashes). Vectors in entity nodes matching
pathString_regex_flatten
will be flattened into a single character
string value; vectors in entity nodes matching pathString_regex_explode
will be exploded into multiple rows.
A regular expression to force flattening of fields regardless of matching to other regular expressions.
Whether to return a long ('tidy') data frame, with all
values on a separate row, or a wide ('multivariate') data frame, where
columns represent different variables. Setting this to FALSE
is not yet
supported.
Regex that the target entities' path strings have to match (otherwise, the entity is excluded)
Whether to be silent or chatty.
Values to return when encountering NULL
or NA
.
Values to return warnings for.
A list of functions to run on the values that can
return a character value - if they do, that is shown as a warning or printed
(depending on the value of silent
).
A list or a dataframe (if returnDf
is TRUE
).