[R] naming vectors/ matrices in R
dieter.menne at menne-biomed.de
Tue Mar 31 17:30:21 CEST 2009
emj83 <stp08emj <at> shef.ac.uk> writes:
> I would like to create a series of vectors in a loop and name them with
> I know the command letters gives me the 26 letters of the alphabet.
> For example, I have a dataframe, called A, with 6 columns.
>  "a" "b" "c" "d" "e" "f"
> I would like to extract the first letter "a", and put the first column of
> dataframe A in a vector called "a"
>  "a"
> but when I type
> Warning message:
> In e =A[, 1] :
> number of items to replace is not a multiple of replacement length
This is really difficult to understand. Try to make the example so that
is can be pasted in R. For example, where is your dataframe A?
A = data.frame(a=1:10,b=1:10)
e = A[,1]
More information about the R-help