Hi,

I'm wanting to exclude data more than 2 sd's from the mean before proceeding
with further analyses. I've created new logical variables (a and b) and
written them to the existing dataframe. I want to be able to subset the TRUE
observations based on another 2 factor variable. I'm assuming this is
possible, but I don't know what I'm doing wrong, as I get results that
obviously aren't correct.

Many thanks,

Paul

twin.wide$a<-twin.wide$RCCT<600 & twin.wide$RCCT>480
twin.wide$b<-twin.wide$LCCT<600 & twin.wide$LCCT>480

selVarsCCT <- with(twin.wide,c('a','b'))

MZCCT <- subset(twin.wide,Zygosity=='MZ',selVarsCCT)
DZCCT <- subset(twin.wide,Zygosity=='DZ',selVarsCCT)
-- 
View this message in context: 
http://n4.nabble.com/Exclude-data-using-logical-tp1689992p1689992.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