-
Notifications
You must be signed in to change notification settings - Fork 269
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
2-column source->target dataframe to link and node lists? #246
Comments
At the moment, no, there is no exported function to do specifically that task. The # create nodes data
node_names <- factor(sort(unique(c(as.character(sources), as.character(targets)))))
nodes <- data.frame(name = node_names, group = 1, size = 8)
# create links data
links <- data.frame(source = match(sources, node_names) - 1,
target = match(targets, node_names) - 1,
value = 1) I’ve been working on a major overhaul of |
Is there a native munging function for getting a 2-column (source->target) data.frame into a link list and node list format?
The 2-column dataframe has the following format
The link list would be:
and the node list would be
I can get the data into this format but I want to know if there are standard methods for doing so?
The text was updated successfully, but these errors were encountered: