nodeName.Rd
Check whether a prospective node name is valid, sanitize it, and return it
nodeName(
x,
entityName = NULL,
thisEntityText = "this entity (with temporary name '%s')"
)
The (sanitized) node name
metabefor::nodeName("this_is_valid");
#> [1] "this_is_valid"
metabefor::nodeName("this is sanitized");
#> [1] "thisissanitized"
if (FALSE) {
metabefor::nodeName(
"_thisThrowsAnError:first character can't be _"
);
### This also throws an error: a reserved name by data.tree
metabefor::nodeName(
"parent"
);
}