Skip to content
Prev 175628 / 398503 Next

naming vectors/ matrices in R

This is probably what you want

mydf<-as.data.frame(matrix(1:60,10))
for (i in (1:dim(mydf)[2])) assign(letters[i],mydf[,i])


I would not, however, recommend it.
It really does not produce very readable code.
emj83 wrote: