[R] svyboxplot - library (survey)
Muhuri, Pradip (SAMHSA/CBHSQ)
Pradip.Muhuri at samhsa.hhs.gov
Mon Oct 1 15:50:22 CEST 2012
Hello,
I have used the library (survey) package for boxplots using the following code.
Could anyone please tell me why I am getting only 1 boxplot instead of 2 boxplots (1-SPD, 2-No SPD).
What changes in the following code would be required to get 2 boxplots in the same plot frame?
Thanks,
Pradip
###################################################
nhis <- svydesign (id=~psu, strat=~stratum, weights=~wt8,
data=tor, nest=TRUE)
svyboxplot (dthage~xspd2, subset (nhis, mortstat==1), col="gray80",
varwidth=TRUE, ylab="Age at Death", xlab="SPD Status: 1-SPD, 2=No SPD")
Pradip K. Muhuri
Statistician
Substance Abuse & Mental Health Services Administration
The Center for Behavioral Health Statistics and Quality
Division of Population Surveys
1 Choke Cherry Road, Room 2-1071
Rockville, MD 20857
Tel: 240-276-1070
Fax: 240-276-1260
e-mail: Pradip.Muhuri at samhsa.hhs.gov
The Center for Behavioral Health Statistics and Quality your feedback. Please click on the following link to complete a brief customer survey: http://cbhsqsurvey.samhsa.gov
vide commented, minimal, self-contained, reproducible code.
More information about the R-help
mailing list