Closed graemeblair closed 6 years ago
Can you post the error message?
Sorry! Yes, including traceback:
Error in `[<-`(`*tmp*`, , ID_label, value = c("01", "02", "03", "04", :
subscript out of bounds
5.
FUN(N = N, ID_label = ID_label, by = by, workspace = working_environment_,
data_arguments = dots) at helper_functions.R#422
4.
do_internal(N, by = by, ..., FUN = cross_levels_internal, from = "link_level") at cross_levels.R#71
3.
link_levels(N = 15, by = join(primary_schools, secondary_schools),
working_environment_ = <environment>, ID_label = "students")
2.
eval_tidy(dots[[i]]) at aaa_fabricate.R#184
1.
fabricate(primary_schools = add_level(N = 5), secondary_schools = add_level(N = 6,
nest = FALSE), students = link_levels(N = 15, by = join(primary_schools,
secondary_schools)))
See commit above and add your snippet as a regression test.
This generates an error:
But this, same but with a variable at the top level, does work:
Trying to demonstrate simple cross-classifying.