Looking at length(list(2:305)) and str(list(2:305)) can be instructive. You don't need the list(), and you probably want to use `legal' names for variables.
Andy From: Chia, Yen Lin > > Hi all, > > > > I have read a data matrix of 304 x 404 using read.table. When I am > trying to name the colnames, with first try colnames(L5)<-list(2:305), > > I keep getting error message such as > > > > Error in "colnames<-"(`*tmp*`, value = list(c(2, 3, 4, 5, 6, > 7, 8, 9, : > > > length of 'dimnames' [2] not equal to array extent > > > > and I don't know why. But, if I look at the original names > in terms of > V1, V2, the rownames are repeated again after V256. Is there a > limitation? > > > > Thanks. > > > > Yen Lin > > > [[alternative HTML version deleted]] > > ______________________________________________ > [email protected] mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! > http://www.R-project.org/posting-guide.html > > ______________________________________________ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
