R: Auxiliary Function for Matching (original) (raw)

mtfrm {base} R Documentation

Description

Transform objects for matching via [match](../../base/help/match.html)(), think “match form” -> "mtfrm".base provides the S3 generic and a default plus"[POSIXct](../../base/help/POSIXct.html)" and "POSIXlt" methods.

Usage

mtfrm(x)

Arguments

Details

Matching via [match](../../base/help/match.html) will use mtfrm to transform internally classed objects (see [is.object](../../base/help/is.object.html)) to a vector representation appropriate for matching. The default method performs[as.character](../../base/help/as.character.html) if this preserves the length.

Ideally, methods for mtfrm should ensure that comparisons of same-classed objects via [match](../../base/help/match.html) are consistent with those employed by methods for [duplicated](../../base/help/duplicated.html)/[unique](../../base/help/unique.html)and [==](../../base/help/+3D+3D.html)/[!=](../../base/help/+21+3D.html) (where applicable).

Value

A vector of the same length as x.


[Package _base_ version 4.6.0 Index]