vectorR Documentation

Vector

Description

fm.as.vector converts an object to a FlashR vector. as.vector converts a FlashR vector to an R vector. fm.is.vector test whether the input argument is a FlashR vector.

Usage

fm.as.vector(obj)

## S4 method for signature 'fmV'
as.vector(x)

## S4 method for signature 'fm'
as.vector(x)

fm.is.vector(x)

Arguments

obj

an object

x

a FlashR vector

Details

Right now, fm.as.vector can only convert a matrix with only one row or one column. Otherwise, the function returns NULL.

Value

a FlashR vector

Examples

vec <- fm.as.vector(runif(100)) # Convert an R vector to a FlashR vector.
vec <- as.vector(fm.runif(100)) # Convert a FlashR vector to an R vector.
res <- fm.is.vector(vec) # Test if an object is a FlashR vector.