为什么使用分配错误?
assign
apply
names.foo <- letters values.foo <- LETTERSfor (i in 1:length(names.foo)) assign(names.foo[i], paste("This is: ", values.foo[i]))
foo <- lapply(X=values.foo, FUN=function (k) paste("This is :", k))names(foo) <- names.foo
assign