SyntaxFix
Write A Post
Hire A Developer
Questions
You can also use the filter function from the dplyr package which returns rows with matching conditions.
> library(dplyr) > nrow(filter(aaa, sex == 1 & group1 == 2)) [1] 3 > nrow(filter(aaa, sex == 1 & group2 == "A")) [1] 2