c.dvec {yamlet} | R Documentation |
Combine Decorated Vector
Description
Combines decorated vectors. Tries to preserve
attributes by resolving pairwise conflicts intelligently.
The attributes of the first item are reconciled
with those of the second, then those of the third, etc.
the class
attribute is untouched.
Usage
## S3 method for class 'dvec'
c(...)
Arguments
... |
items to be combined, presumably all vectors |
Details
By default, the first version of any attribute is preserved, with warning if the alternative differs. NULLs are largely ignored. If either attribute is a list the other is coerced to a list with as.list(). If either of two lists has names, then names are enforced for the other (blank names if necessary). Lists are combined in forward order, and elements that are duplicates in value and name (if present) are removed. If the result has only blank names, these are removed as well.
Value
dvec
See Also
Other dvec:
[.dvec()
,
[<-.dvec()
,
[[.dvec()
,
[[<-.dvec()
,
as.data.frame.dvec()
,
as_dvec()
,
as_dvec.character()
,
as_dvec.complex()
,
as_dvec.dvec()
,
as_dvec.integer()
,
as_dvec.logical()
,
as_dvec.numeric()
,
classified.dvec()
,
desolve.dvec()
,
explicit_guide.data.frame()
,
format.dvec()
,
implicit_guide.dvec()
,
length.dvec()
,
print.dvec()
,
resolve.classified()
,
resolve.dvec()
,
unclassified.dvec()
Examples
a <- as_dvec(letters[1:3], label = 'foo')
b <- as_dvec(letters[3:5], label = 'foo')
c <- c(a,b)
c
class(c)