View source: R/rename_models.R
| rename_models | R Documentation |
netobject_groupReplaces the names of the constituent networks in a netobject_group
(or any object inheriting from it). Useful when build_network()
produced generic labels (e.g. "Cluster 1", "Cluster 2") and you
want to substitute meaningful ones (e.g. "High engagement",
"Low engagement").
rename_models(x, new_names)
## S3 method for class 'netobject_group'
rename_models(x, new_names)
## Default S3 method:
rename_models(x, new_names)
x |
A |
new_names |
A character vector of new names. Must have the same
length as |
A netobject_group of the same class with renamed members.
## Not run:
d <- tna::group_regulation
grp <- build_network(d, method = "tna",
group = sample(c("a", "b"), nrow(d), TRUE))
grp <- rename_models(grp, c("High", "Low"))
names(grp)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.