Named vectors and the frab package
Named vectors are closely related to frab
objects, but are not the same. However, there is a natural coercion from one to the other.
as.namedvector(v) is.namedvector(v) is.namedlogical(v) is.unnamedlogical(v) is.unnamedvector(v)
v
: Argument to be tested or coercedCoercion and testing for named vectors. Function nv_to_frab()
, documented at frab.Rd
, coerces a named vector to a frab
.
Function is.namedvector()
returns a boolean, function as.namedvector()
returns a named vector.
Robin K. S. Hankin
The issue of named logical vectors in the frab
package is discussed briefly at inst/wittgenstein.Rmd
.
x <- c(a=5, b=3, c=-2,b=-3, x=33) is.namedvector(x) as.namedvector(frab(x)) x <- c(a=5, b=3, c=-2) y <- c(p=1, c=2, d= 6) x y x+y frab(x) + frab(y)