Support for C++ vector of arrays

# S3 method for arrayvec
print(x, ...)

# S3 method for arrayvec
dim(x)

# S3 method for arrayvec
as.matrix(x, ...)

# S3 method for arrayvec
as.data.frame(x, ...)

# S3 method for arrayvec
[(x, i, j, drop = TRUE)

# S3 method for arrayvec
[[(x, ...)

Arguments

x

an arrayvec object

...

other parameters

i

row

j

column

drop

drop singleton dimensions if true

Value

print.arrayvecthe object invisibly
dim.arrayvecthe rows and columns
as.matrix.arrayveca matrix
as.data.frame.arrayveca data frame
`[.arrayvec`a matrix or vector
`[[.arrayvec`a column vector

Details

Because kdtools is implemented in C++, it operates natively on a vector of arrays. An arrayvec object is a wrapper around a pointer to a vector of arrays. These functions provide some ability to manipulate the data as if it were a matrix.