Description Usage Arguments Details Value Examples
Check the type of an object
1 2 3 | is.altrep(x)
is.altWrapper(x)
|
x |
An object |
is.altrep
: Is an object ALTREP?
is.altWrapper
: Is an object altWrapper?
Logical value indicating whether the object is an ALTREP
Logical value indicating whether the object is an altWrapper
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | ## An R vector is not ALTREP nor altWrapper.
x=runif(10)
is.altrep(x)
is.altWrapper(x)
## A compact sequence is ALTREP but not altWrapper.
x=1:10
is.altrep(x)
is.altWrapper(x)
## An altWrapper object is also an ALTREP object
length_func <- function(x) length(x)
setAltClass(className = "example", classType = "integer")
setAltMethod(className = "example", getLength = length_func)
A <- newAltrep(className = "example", x = 1L:10L)
is.altrep(x)
is.altWrapper(A)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.