Closed ruudfiers closed 4 years ago
Sorry, not sure what you mean: the ifelse
function is not part of the package, it's just a way to label the nodes in the example that you cite.
The %v%
function will only ever affect the nodes of your network (see its documentation), so you do have a means to label the nodes of your network, but it's provided by the network
package, not by the ggnet
function.
Closing because I don't think I can answer much about the question (and am probably too late anyway, sorry).
Are there more options to set the vertex attribute for grouping, except by using the ifelse argument?
net %v% "phono" = ifelse(letters[1:10] %in% c("a", "e", "i"), "vowel", "consonant")
I want to group character vectors that indicate the nodes in the network, but cannot figure out how to do it.