# NOT RUN {
test1 <- c("a_b", "a__b", "_a_b", "a_b_", "_a__b_", "___")
# }
# NOT RUN {
# this returns an error:
check(test1)
# }
# NOT RUN {
# data frame with cues and outcomes:
(dat <- data.frame(Cues=test1, Outcomes=sample(test1), stringsAsFactors=TRUE))
# remove empty:
check(dat)
# only indicating which rows contain empty cues/outcomes:
(test <- check(dat, rm=FALSE))
# check empty cues:
dat[test %in% c(1,3),]
# check empty outcomes:
dat[test %in% c(2,3),]
# }
Run the code above in your browser using DataLab