This is a method for the generic function subset
.
It extracts the subset of rows of x
that satisfy the logical expression
subset
, and retains only the columns of x
that are
specified by the expression select
. The result is always a
hyperframe.
The argument subset
determines the subset of rows that
will be extracted. It should be a logical expression.
It may involve the names of columns of x
.
The default is to keep all points.
The argument select
determines which columns of x
will be retained.
It should be an expression involving the names of columns
(which will be interpreted as integers representing the positions of
these columns). For example if there are columns named
A
to Z
, then select=D:F
is a valid expression
and means that columns D
, E
and F
will be
retained. Similarly select=-(A:C)
is valid and means that columns
A
to C
will be deleted.
The default is to retain all columns.
Setting subset=FALSE
will remove all the rows.
Setting select=FALSE
will remove all the columns.
The result is always a hyperframe.