Refer to a variable by pasting strings then make changes and see them refrelcted in the original variable

后端 未结 0 1417
我在风中等你
我在风中等你 2020-12-05 01:42
my_mtcars_1 <- mtcars
my_mtcars_2 <- mtcars
my_mtcars_3 <- mtcars

for(i in 1:3) {get(paste0(\'my_mtcars_\', i))$blah <- 1}
Error in get(paste0("my_         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题