Hello,
Say I have 2 columns, bmi and gender, the first being all the values and the
second being male or female. How would I subset this into males only and
females only? I have searched these fora and read endlessly about select[]
and split() functions but to no avail. Also the table is not ordered.
bmi gender -> bmi gender + bmi gender
1 24.78 male 1 24.78 male 3 23.18 female
2 26.42 male 2 26.42 male 4 22.36 female
3 23.18 female ... ...
4 22.36 female
...
Thank you in advance
--
View this message in context:
http://r.789695.n4.nabble.com/Creating-subsets-of-a-matrix-tp3232838p3232838.html
Sent from the R help mailing list archive at Nabble.com.
______________________________________________
[email protected] 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.