prune_and_reorder_vector: Prune and reorder vector elements
Description
Given two vectors, the first one's elements are pruned and reordered according
to the common values of the second vector and the elements' names
(attribute) of the first. If there no common such values, an empty vector is
returned.
Usage
prune_and_reorder_vector(vec, filter.vec)
Value
the pruned and re-arranged vector.
Arguments
vec
a vector with names attribute
filter.vec
a character vector whose values will be used to filter the
vec elements