vectorize: Vectorize

Description Usage Arguments Examples

Description

Returns a vector that is a stack of the columns of x

Usage

1
  vectorize(x, as.column = TRUE)

Arguments

x

a numeric matrix (or data.frame)

as.column

whether to return results in a one column matrix

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
x = matrix(1:12, 4, 3)
vectorize(x)

# synonym function
vec(x)

vectorize(x, as.column = FALSE)

vectorize(iris[1:5, 1:3])

vectorize(1:5)

gastonstat/matrixkit documentation built on May 16, 2019, 5:45 p.m.