Extract a Column from a Dataset

DESCRIPTION:

Selects (subscript extraction) a column, as a 1-dimensional dataset, from a 1- or 2-dimensional dataset.

USAGE:

select.col(x, column) 

REQUIRED ARGUMENTS:

x
1- or 2-dimensional dataset whose column will be selected. A 1-dimensional dataset is considered to be a single, unnamed column.
column
logical, integer, or character value specifying the column of x which is to be selected.

VALUE:

The subscript extraction of column of x, as a 1-dimensional dataset.

SEE ALSO:

, , , , .

EXAMPLES:

# typical way to allow/verify column selection by name or number 
"column.select"<- 
function(x, select.spec) 
{ 
        select.spec <- index.rowcol(x, select.spec, which="columns") 
        valid.rowcol(select.spec, 1, count.cols(x), T) 
        select.col(x, select.spec) 
}