My code is like this:
fcase(V2009 == 9L & V3006 == 2L, V1032,
V2009 == 10L & V3006 == 3L, V1032,
V2009 == 11L & V3006 == 4L, V1032,
V2009 == 12L & V3006 == 5L, V1032,
V2009 == 13L & V3006 == 6L, V1032,
V2009 == 14L & V3006 == 7L, V1032,
V2009 == 15L & V3006 == 8L, V1032,
V2009 == 16L & V3006 == 9L, V1032,
V2009 == 17L & V3006 == 10L, V1032,
default = NA_integer_)
I thought it would look better inside a loop, for example:
fcase(for(i in 9L:17L){
for(j in 2L:10L){
V2009 == i & V3006 == j, V1032}}, default = NA_integer_ )
Of course this way the code wont run, but is there any?