as.antsMatrix: Coerce Object to as.antsMatrix

as.antsMatrixR Documentation

Coerce Object to as.antsMatrix

Description

convert types to an antsMatrix

Usage

as.antsMatrix(object, elementtype = "float", ...)

## S4 method for signature 'list'
as.antsMatrix(object, elementtype = "float")

## S4 method for signature 'data.frame'
as.antsMatrix(object, elementtype = "float")

## S4 method for signature 'matrix'
as.antsMatrix(object, elementtype = "float")

Arguments

object

An object

elementtype

e.g. "float" or "double"

...

other parameters

Examples

as.antsMatrix(matrix(rnorm(10), nrow = 2))
mat <- matrix(rnorm(10), nrow = 2)
df <- as.data.frame(mat)
as.antsMatrix(df)
as.antsMatrix(as.list(df))

stnava/ANTsR documentation built on April 16, 2024, 12:17 a.m.