So I have the following problem, I need to write a function plotGraph(x , y) in R with the following properties:
The argument x may be a matrix or data frame with two columns containing coordinates of vertices of a graph. The argument y must be a quadratic adjacency matrix that has as many rows and columns as x has rows. Values of 0 of NA stand for “no connection”. Positive values stand for the connection strength. Negative values are not allowed. After that I need to visualize the resulting graph in the coordinate system given by x, where connection strengths should be visualized by different line widths and check inputs for validity. Note: I can only use packages that are pre-loaded with R (e.g. graphics , grDevices). Can someone please explain me how to do that ? I understand that y is the information about the nodes in the network and their connections (vertices & edges), x is the information about the network layout, i.e. where to place the nodes. But I don't know how to do the visualization part with the different connection strenghts ? Thanks in advance :) [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.