Primitive function c is internally generic but
dispatches only on its first argument. A corollary is that
c(x, ...) does not dispatch the S4 method with
signature x="flint" if x is not a flint vector,
even if a flint vector appears later in the call as an element
of .... An S3 method c.flint is registered and
exported to support concatenation with c.flint(x, ...) as
an alternative to c(as(x, "flint"), ...).
# S3 method for flint
c(..., recursive = FALSE, use.names = TRUE)If none of the arguments is a flint vector, then the internal
default method for c is dispatched.
If at least one argument is a flint vector, then the return
value is a flint vector, unless recursive = FALSE and
at least one argument is a symbol, pairlist, list, or expression,
in which case the return value is a list or expression. The length
is the sum of the lengths of the arguments.
If the return value is a flint vector, then its class is the
most specific subclass of flint whose range contains the ranges
of the classes of the arguments.
objects inheriting from virtual class flint,
atomic (except character) vectors, and NULL.
a logical indicating if pairlists, lists, and expressions should be
handled recursively. If TRUE, then the function behaves as
if such arguments were replaced by their terminal nodes.
a logical indicating if names should be preserved.
Virtual class flint.
x <- .slong(x = 2:5)
c(x, 6L)
c(1L, x) # bad
c.flint(x, 6L)
c.flint(1L, x)
Run the code above in your browser using DataLab