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 Thanks and Regards, XINLI [[alternative HTML version deleted]]
Both ??radar and ??spider return ?stars. 2011/9/8 XINLI LI <lihawaii at gmail.com>:> 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 > > Thanks and Regards, > > XINLI > > ? ? ? ?[[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org 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. >
# install.packages('sos') library(sos) findFn('radar plot') gets 29 hits on my system. The two that seem to be the most relevant are radarchart() from the fmsb package and, as mentioned in the other reply, stars() from the autoloaded graphics package. BTW, read the quoted text and observe how your data came through. HTH, Dennis On Thu, Sep 8, 2011 at 1:31 PM, XINLI LI <lihawaii at gmail.com> 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 > > Thanks and Regards, > > XINLI > > ? ? ? ?[[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org 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. >
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