as.vector: The as.vector() generic

Description Usage Arguments Details

Description

Generic for the base::as.vector function

Usage

1
as.vector(x, mode = "any")

Arguments

x

an R object

mode

character string naming an atomic mode or "list" or "expression" or (except for vector) "any". Currently, is.vector() allows any type (see typeof) for mode, and when mode is not "any", is.vector(x, mode) is almost the same as typeof(x) == mode.

Details

Need to explicitly define this generic otherwise the implicit generic in package "base" would dispatch on ('x', 'mode'). Here we set dispatch on the 1st arg (the 'x' arg) only!


cdeterman/generics documentation built on May 20, 2019, 8:01 p.m.