# 4 . (a) Create subvectors, one for boys and one for girls.

bmi.male <- subset(bmi, gender == "male")           # Creates a subset of bmi 
with
male only values n=30
bmi.female <- subset(bmi, gender == "female")       # Creates a subset of bmi
with female only values n=30
male.bmi.only <-(bmi.male [, 1])                            # To help with the 
next questions I
remove the "male" and 
female.bmi.only <-(bmi.female [, 1])                # "female" columns in 
favour of
naming the data sets.


I went with Josh's answer and I thank you for the help I received so
quickly.
-- 
View this message in context: 
http://r.789695.n4.nabble.com/Creating-subsets-of-a-matrix-tp3232838p3233150.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
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.

Reply via email to