R: Internal Generic Functions (original) (raw)

InternalMethods {base} R Documentation

Description

Many R-internal functions are generic and allow methods to be written for.

Details

The following primitive and internal functions are generic, i.e., you can write [methods](../../utils/html/methods.html) for them:

[[](../../base/help/+5B.html),[[[](../../base/help/+5B+5B.html),[$](../../base/help/+24.html),[[<-](../../base/help/+5B+3C-.html),[[[<-](../../base/help/+5B+5B+3C-.html),[$<-](../../base/help/+24+3C-.html),

[length](../../base/help/length.html),[length<-](../../base/help/length+3C-.html),[lengths](../../base/help/lengths.html),[dimnames](../../base/help/dimnames.html),[dimnames<-](../../base/help/dimnames+3C-.html),[dim](../../base/help/dim.html),[dim<-](../../base/help/dim+3C-.html),[names](../../base/help/names.html),[names<-](../../base/help/names+3C-.html),[levels<-](../../base/help/levels+3C-.html),[@](../../base/help/+40.html),[@<-](../../base/help/+40+3C-.html),

[c](../../base/help/c.html),[unlist](../../base/help/unlist.html),[cbind](../../base/help/cbind.html),[rbind](../../base/help/rbind.html),

[as.character](../../base/help/as.character.html),[as.complex](../../base/help/as.complex.html),[as.double](../../base/help/as.double.html),[as.integer](../../base/help/as.integer.html),[as.logical](../../base/help/as.logical.html),[as.raw](../../base/help/as.raw.html),[as.vector](../../base/help/as.vector.html),[as.call](../../base/help/as.call.html),[as.environment](../../base/help/as.environment.html) [is.array](../../base/help/is.array.html),[is.matrix](../../base/help/is.matrix.html),[is.na](../../base/help/is.na.html),[anyNA](../../base/help/anyNA.html),[is.nan](../../base/help/is.nan.html),[is.finite](../../base/help/is.finite.html) [is.infinite](../../base/help/is.infinite.html) [is.numeric](../../base/help/is.numeric.html),[nchar](../../base/help/nchar.html) [rep](../../base/help/rep.html),[rep.int](../../base/help/rep.int.html) [rep_len](../../base/help/rep%5Flen.html) [seq.int](../../base/help/seq.int.html)(which dispatches methods for "seq"),[is.unsorted](../../base/help/is.unsorted.html)and[xtfrm](../../base/help/xtfrm.html)

In addition, is.name is a synonym for [is.symbol](../../base/help/is.symbol.html) and dispatches methods for the latter. Similarly, [as.numeric](../../base/help/as.numeric.html)is a synonym for as.double and dispatches methods for the latter, i.e., S3 methods are for as.double, whereas S4 methods are to be written for as.numeric.

Note that all of the group generic functions are also internal/primitive and allow methods to be written for them.

.S3PrimitiveGenerics is a character vector listing the primitives which are internal generic and not group generic, (not only for S3 but also S4). Similarly, the .internalGenerics character vector contains the names of the internal (via [.Internal](../../base/help/.Internal.html)(..)) non-primitive functions which are internally generic.

Note

For efficiency, internal dispatch only occurs on objects, that is those for which [is.object](../../base/help/is.object.html) returns true.

See Also

[methods](../../utils/html/methods.html) for the methods which are available.


[Package _base_ version 4.6.0 Index]