Skip to content
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

Added attribute, coordinates to node using R #24

Open
SaharanAbhishek opened this issue Apr 15, 2020 · 0 comments
Open

Added attribute, coordinates to node using R #24

SaharanAbhishek opened this issue Apr 15, 2020 · 0 comments

Comments

@SaharanAbhishek
Copy link

Suppose I have below dataframe for nodes:

Node ID xAxis yAxis Name City
1 0 10 20 John New York
2 1 11 21 Peter Paris
3 2 12 22 Tom London
4 3 13 23 Sam Los Angeles
5 4 14 24 Jack Tokyo

for edges

Edge Source Target
1 0 1
2 0 3
3 1 4
4 1 2
5 2 3
6 3 1
7 4 4

In javascript case (I have JSON instead of dataframe in this case), first I will loop through all nodes and create object for each node with attribute and then push same to nodes array, same for edges.

Now want to achive same through R.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant