| check_groups | R Documentation |
Check group specification
check_groups(groups, all_features)
groups |
( |
all_features |
(character()) All available feature names from the task. |
The input list group, with each element now named.
task <- sim_dgp_interactions(n = 100)
task$feature_names
# Intended use
groups1 = list(effects = c("x1", "x2", "x3"), noise = c("noise1", "noise2"))
check_groups(groups1, task$feature_names)
# Names are auto-generated where needed
check_groups(list(a = "x1", c("x2", "x1")), task$feature_names)
# Examples for cases that throw errors:
# Unexpected features
groups2 = list(effects = c("x1", "foo", "bar", "x1"))
try(check_groups(groups2, task$feature_names))
# Too deeply nested
groups3 = list(effects = c("x1", "x2", "x3"), noise = c("noise1", list(c("noise2"))))
try(check_groups(groups2, task$feature_names))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.