[R] Frequencies from a matrix - spider from frequencies

Uwe Dippel udippel at uniten.edu.my
Sun Mar 21 09:53:24 CET 2010


Jim Lemon wrote:
> Yes, I realized that I had forgotten to require(plotrix) after I sent
> the message. From your example, you might also want to look at the 
> diamondplot function, also in plotrix.
>   

Jim,

thanks for the hint to diamondplot. It is much closer natively to what I 
wanted to do, and simple to use. Hats off!: Just entering the data frame 
produces a quick print.
However, it fails to make sense w.r.t. units and values here.
I use the example data and code given in ?diamondplot:
data(mtcars)
      
mysubset<-mtcars[substr(dimnames(mtcars)[[1]],1,1)=="M",c("mpg","hp","wt","disp")]
      diamondplot(mysubset)
and get a plot (I think I can't attach it here?), with, e.g.
hp and disp crossing the Maserati radial axis at 17, wt at 15 and mpg at 10.
The actual data row, though, is
                          mpg  hp    wt  disp
Maserati Bora 15.0 335 3.570 301.0

Looking closer, the plot seems to arbitrarily scale all values (columns) 
to a(n arbitrary?) maximum of '17'.
And when I print my data (submitted earlier), the same happens: all 
responses are scaled to 17 as the highest in each category. From that 
point of view, diamondplot is not that useful. How can I force it not to 
scale arbitrarily, but print the actual numbers?

Uwe



More information about the R-help mailing list