powered by
Named vectors are closely related to frab objects, but are not the same. However, there is a natural coercion from one to the other.
frab
as.namedvector(v) is.namedvector(v) is.namedlogical(v) is.unnamedlogical(v) is.unnamedvector(v)
Function is.namedvector() returns a boolean, function as.namedvector() returns a named vector.
is.namedvector()
as.namedvector()
Argument to be tested or coerced
Robin K. S. Hankin
Coercion and testing for named vectors. Function nv_to_frab(), documented at frab.Rd, coerces a named vector to a frab.
nv_to_frab()
frab.Rd
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)
Run the code above in your browser using DataLab