Function c is primitive and internally generic but it
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 a
component of ....
Functions cbind and rbind are internally
generic and dispatch on all components of ..., creating the
possibility of dispatch ambiguities; see cbind2 and
rbind2.
S3 methods c.flint, cbind.flint and rbind.flint
are registered and exported to enable users to bypass internal
dispatch.
# S3 method for flint
c(..., recursive = FALSE, use.names = TRUE)
# S3 method for flint
cbind(..., deparse.level = 1)
# S3 method for flint
rbind(..., deparse.level = 1)If none of the arguments is a flint vector, then the internal
default methods are 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 pairlist, name, call, list, or expression,
in which case the return value is a list or expression.
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 or
whose type is one of the vector types or one of the non-vector types
NULL, pairlist, symbol, and language.
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.
an integer (0, 1, or 2) indicating how names are chosen for rows or columns derived from untagged, non-matrix arguments. 0 is to use empty names, 2 is to deparse unevaluated arguments, and 1 (the default value) is to deparse unevaluated arguments only if they are symbols and otherwise use empty names.
x <- slong(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