Vectorize

vec(x, ...)

# S3 method for default
vec(x, ...)

Arguments

x

If yac_symbol treat as such, else call base::as.vector().

...

further arguments passed to base::as.vector()

Examples

(x <- matrix(1:9, ncol = 3))
#>      [,1] [,2] [,3]
#> [1,]    1    4    7
#> [2,]    2    5    8
#> [3,]    3    6    9
vec(x)
#> [1] 1 2 3 4 5 6 7 8 9
vec(ysym(x))
#> {1, 2, 3, 4, 5, 6, 7, 8, 9}