Closed CGUEVARR closed 5 months ago
Hi @CGUEVARR! Good question! You can use the sort()
function. That will order a numeric object in ascending order. See the help, ?sort
for shifting to descending order.
Let me know if that doesn't work for you!
When I use the code to label my plot.....
gplot(
philkidnapmat,
label = network.vertex.names( PhilKidnapNet ),
# the labels we want
gmode = "twomode", # indicate it is two modes usearrows = FALSE, # turn off the arrowheads label.cex=.5, # size the labels main="Philippine Kidnaping Standardized Degree", # add a title vertex.col = node.col, # add the colors
vertex.cex = v.size + 2 # set the size (add 0.5 so it is not too small) )
I get this error...
Error in network.vertex.names()
:
! network.vertex.names requires an argument of class network.
Backtrace:
It may be your second line is not PhilKidnapNet because they don't match
Thanks Jenny, I'll try changing it and see what happens
Still not working with that change ...
Error: ! object 'PhilKidnapmat' not found Backtrace:
Hi @CGUEVARR. Email me your .Rmd file to CRJ507@asu.edu. I will try to debug it.
Thanks @jjgillis0 for helping!
Thank you, Professor! Email sent!
Hi @CGUEVARR , I didn't get the email with the document. Please resend if you can.
Hi @CGUEVARR see my email.
I am stuck on the vertex attribute. I used the max function to identify the actor with the greatest degree of centrality which only returns a number not the name of the person. So then I had to search for that number in the table. Same thing for #10 and the place name. Is there an easier way to return the actual name of the actor or event from the table instead?