dat0 <- psych::bfi[1:250, ]
dat1 <- str2str::pick(x = dat0, val = c("A1","C4","C5","E1","E2","O2","O5",
"gender","education","age"), not = TRUE, nm = TRUE)
vrb_nm_list <- lapply(X = str2str::sn(c("E","N","C","A","O")), FUN = function(nm) {
str2str::pick(x = names(dat1), val = nm, pat = TRUE)})
.gtheorys(dat = dat1,
i = sample(x = 1:nrow(dat1), size = nrow(dat1), replace = TRUE),
nm.list = vrb_nm_list, cross.vrb = TRUE)
.gtheorys(dat = dat1,
i = sample(x = 1:nrow(dat1), size = nrow(dat1), replace = TRUE),
nm.list = vrb_nm_list, cross.vrb = FALSE)
Run the code above in your browser using DataLab