[R] how to count the columns of a data.frame

Ramón Casero Cañas 8-T at gmx.net
Fri Apr 14 19:05:24 CEST 2006


giacomo moro wrote:
> 
> 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?

ncol(data.frame)

-- 
Ramón Casero Cañas

http://www.robots.ox.ac.uk/~rcasero/wiki
http://www.robots.ox.ac.uk/~rcasero/blog




More information about the R-help mailing list