[R] naming vectors/ matrices in R

2009-03-31 Thread emj83
of A. is there any other way in which I can achieve this? Thanks in advance -- View this message in context: http://www.nabble.com/naming-vectors--matrices-in-R-tp22802121p22802121.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r

Re: [R] naming vectors/ matrices in R

2009-03-31 Thread Dieter Menne
emj83 stp08emj at shef.ac.uk writes: I would like to create a series of vectors in a loop and name them with letters. I know the command letters gives me the 26 letters of the alphabet. For example, I have a dataframe, called A, with 6 columns. B-length(A) C-letters(1:B) [1] a b

Re: [R] naming vectors/ matrices in R

2009-03-31 Thread Erich Neuwirth
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: I would like to create a series of vectors in a loop and name them with