Skip to content
Prev 316583 / 398506 Next

Locate Patients who have multiple high blood pressure readings

structure(list(ColA = c(92L, 94L, 174L, 176L, 180L, 268L, 268L
), PT_ID = c(1900L, 1900L, 2900L, 2900L, 3900L, 3900L, 3900L),
    Blood_Pressure = c(90, 90, 140, 130, 120, 150, 90), OBS_TYPE = structure(c(1L,
    1L, 2L, 2L, 2L, 2L, 1L), .Label = c("DBP", "SBP"), class = "factor")), .Names = c("ColA",
"PT_ID", "Blood_Pressure", "OBS_TYPE"), class = "data.frame", row.names = c(NA,
-7L))
PT_ID Include
1  1900    TRUE
2  2900   FALSE
3  3900   FALSE

sum(logicalVector) tells how many TRUE's are in logicalVector.

Bill Dunlap
Spotfire, TIBCO Software
wdunlap tibco.com