[R] Spider (Radar) Plot

Jim Lemon jim at bitwrit.com.au
Fri Sep 9 12:54:34 CEST 2011


On 09/09/2011 06:31 AM, XINLI LI wrote:
> Dear R Group:
>
>     Based on the following data, how to do a great Spider (Radar) Plot? Any
> advice is greatly appreciated.
>
>       HospID Rate Age Charlson NIHSS 1 0.2 49 3.5 0 2 0.1 48 1.8 12 3 0.4 56
> 2.1 5 4 0.3 77 0 7 5 0.2 67 6.5 3 6 0.1 62 4.8 4.6 7 0.1 64 12 5.2 8 0.3 61
> 3 2.8 9 0.15 69 4.5 1.9 10 0.22 80 0 6.7 11 0.34 61 6 4.2 12 0.18 63 3 6.1
> 13 0.09 64 8 15 12 0 56 10 11 15 0.1 70 11 7 16 0.21 43 9 9
>
Hi XINLI,

How about this:

hosp<-read.table("hosp.dat",header=TRUE)
library(plotrix)
radial.plot(t(hosp[,4:5]),rp.type="p",labels=hosp$HospID,
  show.radial.grid=FALSE)
par(xpd=TRUE)
legend(10,17,c("NIHSS","Charlson"),lty=1,col=c(2,1))
par(xpd=FALSE)

Jim



More information about the R-help mailing list