Re: [R] Weighted association map

From: Gabor Grothendieck <ggrothendieck_at_gmail.com>
Date: Fri 08 Sep 2006 - 11:53:21 GMT

Actually the discretization does not appear to be needed. This works just as well:

set.seed(123)
kor <- cor(iris[1:4])
gplot(sign(kor), edge.lwd = 10*kor, displaylabels = TRUE, label = rownames(kor))

On 9/8/06, Gabor Grothendieck <ggrothendieck@gmail.com> wrote:
> Try the sna package. Below we calculate the
> correlation matrix, kor, of the numeric cols of builtin iris
> dataset. Zap negative ones and discretize rest to
> get lwd width matrix, lwd, used for edge widths. From
> that create the adjacency matrix, sign(lwd), and plot it
> using indicated layout mode. Seems like three of
> the variables are correlated and Sepal.Width is uncorrelated
> or negatively correlated to those. Try playing around with
> gplot args to create variations.
>
> library(sna)
> set.seed(123) # layout uses random numbers
> kor <- cor(iris[1:4])
> lwd <- replace(kor, TRUE, 10 * round(pmax(0, kor), 1))
> gplot(sign(lwd), edge.lwd = lwd, displaylabels = TRUE, label = rownames(kor))
>
> On 9/8/06, kone <attenka@utu.fi> wrote:
> > Could somebody program this kind of plot type to R, if none exists,
> > based on mds or correlation tables or some more suitable method? What
> > do you think about idea? Does it work? None similar or better exists?
> >
> > http://weightedassociationmap.blogspot.com/
> >
> >
> > Atte Tenkanen
> > University of Turku, Finland
> >
> > ______________________________________________
> > R-help@stat.math.ethz.ch mailing list
> > 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.
> >
>



R-help@stat.math.ethz.ch mailing list
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. Received on Fri Sep 08 21:59:26 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Mon 11 Sep 2006 - 06:30:03 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.