[R] Help on drawing stars and radars in R (update)

Caroline Gideon-Adeniyi c.gideon-adeniyi1 at fashion.arts.ac.uk
Thu Jun 11 11:01:55 CEST 2009


Hi

I don't know if you can help. I am a 2nd year Bsc Cosmetic Science student and in R I need some help in drawing stars.

The problem that I have is I want to recreate a radar diagram similar to the one in excel.

I have put in these commands in a script window:

 stars(shampoo1[, 1:6], locations = c(0,0), radius = TRUE,
  key.loc=c(0,0),
  main = "Ranked Results for the Sensory Evaluation of the Shampoo" ,
  frame.plot = TRUE,
  key.labels = c("Foam Texture", "Skin Feel", "Rinsability", "Wet Combability", "Wet Feel", "Odour"),
  lty = 2,
)

This gives me a black and white radar which is fine.

Now according to the reference manual to colour the stars i need to add:

col.stars = rainbow (30)

Which colours in each star segment. The problem I have with this is that the segments are filled with colour and the segments overlap each other and each segment is not visible.

So I desperately need the command that only colours the outline of the segments or stars instead of  filling it.

This is the example given in the reference manual:

stars(mtcars[, 1:7], locations = c(0,0), radius = FALSE,
key.loc=c(0,0), main="Motor Trend Cars", lty = 2)


Can u help?

Thank  You

Caroline




More information about the R-help mailing list