A single string. Most be one of logical or integer.
Determines the resulting vector. If type = integer then a sparse vector is
returned.
Details
This function, as with any of the other helper functions assumes that the
input x is a sparse numeric vector. This is done for performance reasons,
and it is thus the users responsibility to perform input checking.
Note that the resulting vector will be not be a sparse vector.