Description Usage Arguments Details Value Author(s) Examples
The DataFrame
class provides methods to compare across
rows of the DataFrame
, including ordering and matching. Each
DataFrame
is effectively treated as a vector of rows.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ## S4 method for signature 'DataFrame'
sameAsPreviousROW(x)
## S4 method for signature 'DataFrame,DataFrame'
match(x, table, nomatch = NA_integer_, incomparables = NULL, ...)
## S4 method for signature 'DataFrame'
order(..., na.last = TRUE, decreasing = FALSE, method = c("auto",
"shell", "radix"))
## S4 method for signature 'DataFrame,DataFrame'
pcompare(x, y)
## S4 method for signature 'DataFrame,DataFrame'
e1 == e2
## S4 method for signature 'DataFrame,DataFrame'
e1 <= e2
|
x, table, y, e1, e2 |
A |
nomatch, incomparables |
See |
... |
For For |
decreasing, na.last, method |
See |
The treatment of a DataFrame
as a “vector of rows”
is useful in many cases, e.g., when each row is a record that needs
to be ordered or matched. The methods provided here allow the use of
all methods described in ?Vector-comparison
, including
sorting, matching, de-duplication, and so on.
Careful readers will notice this behaviour differs from the usual
semantics of a data.frame
, which acts as a list-like vector
of columns. This discrepancy rarely causes problems, as it is not
particularly common to compare columns of a data.frame
in
the first place.
Note that a match
method for DataFrame
objects is
explicitly defined to avoid calling the corresponding method for
List
objects, which would yield the (undesired) list-like
semantics. The same rationale is behind the explicit definition of
<=
and ==
despite the availability of pcompare
.
For sameAsPreviousROW
: see sameAsPreviousROW
.
For match
: see match
.
For order
: see order
.
For pcompare
, ==
and <=
: see pcompare
.
Aaron Lun
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.