On Sep 3, 2010, at 3:55 AM, Ravi S. Shankar wrote:
Hi R,
I am using select.list
names=c("Ravi", "Raj","Shubha","Nivriti")
select.list(names) provides a drop down to choose one of the 4 names.
However I would like to know if it is possible to create a
classification something like this
select.list(names) should give
See if these beginnings get you any further:
> ifelse( names %in% c("Ravi", "Raj") ,"Boys", "Girls")
[1] "Boys" "Boys" "Girls" "Girls"
> names[names %in% c("Ravi", "Raj")]
[1] "Ravi" "Raj"
> names[!(names %in% c("Ravi", "Raj"))]
[1] "Shubha" "Nivriti"
In any case you will need to provided a master list of either (or
both) boy names and girl names.
Boys
Ravi
Raj
Girls
Shubha
Nivriti
I should be able to choose only one of the names.
I'm afraid that did not make much sense to me.
--
David.
Any help would be appreciated.
R version 2.10.1 (2009-12-14)
i386-pc-mingw32
locale:
[1] LC_COLLATE=English_United States.1252
[2] LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices datasets utils methods base
other attached packages:
[1] clim.pact_2.2-41 akima_0.5-4 ncdf_1.6.1 rcom_2.2-3
[5] rscproxy_1.3-1
loaded via a namespace (and not attached):
[1] tools_2.10.1
Thank you
Regards
Ravi
This e-mail may contain confidential and/or privileged i...{{dropped:
13}}
______________________________________________
R-help@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.
David Winsemius, MD
West Hartford, CT
______________________________________________
R-help@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.