Subset of Hyperframe Satisfying A Condition
Given a hyperframe, return the subset specified by imposing a condition on each row, and optionally by choosing only some of the columns.
## S3 method for class 'hyperframe': subset(x, subset, select, \dots)
- A hyperframe pattern (object of class
- Logical expression indicating which points are to be kept.
The expression may involve the names of columns of
xand will be evaluated by
- Expression indicating which columns of marks should be kept.
- Arguments passed to
This is a method for the generic function
It extracts the subset of rows of
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
subset determines the subset of rows that
will be extracted. It should be a logical expression.
It may involve the names of columns of
The default is to keep all points.
select determines which columns of
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
select=D:F is a valid expression
and means that columns
F will be
select=-(A:C) is valid and means that columns
C will be deleted.
The default is to retain all columns.
subset=FALSE will remove all the rows.
select=FALSE will remove all the columns.
The result is always a hyperframe.
- A hyperframe.
a <- subset(flu, virustype=="wt") aa <- subset(flu, minnndist(pattern) > 10) aaa <- subset(flu, virustype=="wt", select = -pattern)