The simple code below:
df01 <- data.frame(A = c(1, 2, 3), B = c(4, 5, 6), C = c(7, 8, 9))
Does not work when I tried this:
paste("df", "01", sep = "")
#> "df01"
paste("df", "01", sep = "") <- data.frame(A = c(1, 2, 3), B = c(4, 5, 6), C = c(7, 8, 9))
Error message is "target of assignment expands to non-language object"
What should I use to make it work? I am using it in a for-loop. Thanks!