Dear R-help,

 

I have a matrix D of dimensions 200 x 26; rows are my cases and columns are
my variables. I would like to create a data.frame "DF" with row.names=
myrownames (this is a vector of characters of length 200) and column names
"mycolnames" (a vector of characters of length 26). I could find the option
in data.frame for naming rows, but not for naming columns. So I did:

> data.entry(D, Names= mycolnames)

> DF <- data.frame(D,row.names=myrownames)

but after the first command (i.e. > data.entry(D, Names= mycolnames)) I've
received the warning:

Warning message: 

the condition has length > 1 and only the first element will be used in: if
(dim(x) == dim(args[[i]])) rn <- dimnames(args[[i]])[[1]] else rn <- NULL

what does this warning mean? Is it affecting the values in my data.frame
table? Or something else? Is there a better way of defining columns names in
a data.frame in automated way? 

         

Thank you very much

Francesca


	[[alternative HTML version deleted]]


