Get a single value from a Rxs tree, list of trees, or full Rxs project object

get_clusteredValues_fromTree(
  x,
  clusteringEntityId = NULL,
  clusteredEntityId = NULL,
  supplementWithEntities = NULL,
  entitiesToGet = NULL,
  entitiesToGetRegex = NULL,
  entitiesToIgnoreRegex = NULL,
  returnDf = TRUE,
  flattenVectorsInDf = TRUE,
  pathString_regex_flatten = NULL,
  pathString_regex_explode = NULL,
  fieldname_regex_alwaysFlatten = NULL,
  returnLongDf = FALSE,
  pathString_regex_select = ".*",
  silent = metabefor::opts$get("silent")
)

get_clusteredValues_fromTreeList(
  x,
  clusteringEntityId = NULL,
  clusteredEntityId = NULL,
  supplementWithEntities = NULL,
  entitiesToGet = NULL,
  entitiesToGetRegex = NULL,
  entitiesToIgnoreRegex = NULL,
  returnDf = TRUE,
  nullValue = 0,
  naValue = NULL,
  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_clusteredValues(
  x,
  clusteringEntityId = NULL,
  clusteredEntityId = NULL,
  supplementWithEntities = NULL,
  entitiesToGet = NULL,
  entitiesToGetRegex = NULL,
  entitiesToIgnoreRegex = NULL,
  returnDf = TRUE,
  flattenVectorsInDf = TRUE,
  returnLongDf = TRUE,
  pathString_regex_select = ".*",
  pathString_regex_flatten = NULL,
  pathString_regex_explode = NULL,
  fieldname_regex_alwaysFlatten = NULL,
  silent = metabefor::opts$get("silent")
)

Arguments

x

The tree, tree list, or full Rxs project object.

clusteringEntityId, clusteredEntityId

To indicate which entity values you want, pass either the the entity identifier of the clustering entity containing the clustered entities you want in clusteringEntityId, or a the identifier of a clustered entity that your desired clustering entity contains clusteredEntityId.

returnDf

Whether to return a data frame or not

flattenVectorsInDf

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.

pathString_regex_flatten, pathString_regex_explode

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.

fieldname_regex_alwaysFlatten

A regular expression to force flattening of fields regardless of matching to other regular expressions.

returnLongDf

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.

pathString_regex_select

Regex that the target entities' path strings have to match (otherwise, the entity is excluded)

silent

Whether to be silent or chatty.

nullValue, naValue

Values to return when encountering NULL or NA.

warningValues

Values to return warnings for.

warningFunctions

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

Value

A list or a dataframe (if returnDf is TRUE).