[R] how to count the columns of a data.frame
gunter.berton at gene.com
Fri Apr 14 19:16:36 CEST 2006
> I would like to count the columns of a data.frame. I know
> how to count the rows, but not the columns.
If you knew how to count the rows, you would have known about nrow which has
the same man page as ncol. Also help.search('number of rows') would have
immediately given you your answers. So please do your homework before
posting in future by using R's extensive built-in documentation.
-- Bert Gunter
More information about the R-help