search for: yearsep

Displaying 1 result from an estimated 1 matches for "yearsep".

Did you mean: years
2011 Aug 26
3
elegant way to check if 2 values are in 3 columns?
Dear all, I'm trying to rerun some data linkage exercises in R (they are designed to be done in SPSS, SAS or STATA) The exercise in question is to relabel the column "treat" to "1", if "yearsep" is smaller than 1988 and columns "proc1"-"proc3" contain the values 56.36 or 59.81. My pathetic solution to do this in R currently looks like this: vaslinks4$treat <- 0 vaslinks4$treat[vaslinks4$yearsep < 1988 && (vaslinks4$proc1 %in% c(56.36,59.81)...