> da<-data.frame(x=rnorm(10),y=rnorm(10)) > ncol(da) [1] 2 or
> dim(da)[2] [1] 2 2006/4/15, giacomo moro <[EMAIL PROTECTED]>: > Hi, > I would like to count the columns of a data.frame. I know how to count the > rows, but not the columns. > Can someone tell me how to do it? > My best regards, > Giacomo Moro > > > > --------------------------------- > > [[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 > -- 黄荣贵 Deparment of Sociology Fudan University
______________________________________________ [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
