Using abind with arrays of mode list
I have an array of mode list e.g. as created from the following tapply code:
my.data <- data.frame(expand.grid(species = c(1:3), year = c(1972:2000), VA = c(1:10), SA=c(1:3)))
test <- tapply(my.data$SA, list(my.data$species,my.data$year, my.data$VA), as.character)
mode(test)
#> [1] "list"
is.array(test)
#> [1] TRUE
How do I use abind to add an additional dimension? Using abind will give me an error because of mode "list"
test2 <- abind(test, test[,,1])
#> Error in abind(test, test[, , 1]) :
#> can only supply one list-valued argument for ...
Thank you in advance.