asvec function

Convert to a vector