Number of Columns in a Dataset

DESCRIPTION:

Gives the number of columns in a 1- or 2-dimensional dataset.

USAGE:

count.cols(x) 

REQUIRED ARGUMENTS:

x
1- or 2-dimensional dataset whose column count will be returned.

VALUE:

The number of columns in x. If x is a 1-dimensional dataset, 1.

SEE ALSO:

, , , , .

EXAMPLES:

if(count.cols(my.frame) == 0) my.frame <- insert.col(my.frame, 1, 1)