# Create simulation data
mydata <- data.frame(ace1 = rpois(100, 1),
ace2 = rpois(100, 1),
ace3 = rpois(100, 1),
race = sample(c(1:7), 100, replace = T))
# Select target data
targetdata <- dplyr::filter(mydata, race == 5, ace1 == 1, ace2 == 1)
install dplyr package first, if you have not installed it. To install the package, type: install.packages('dplyr')