as.antsMatrix.Rd
convert types to an antsMatrix
as.antsMatrix(object, elementtype = "float", ...)
# S4 method for class 'list'
as.antsMatrix(object, elementtype = "float")
# S4 method for class 'data.frame'
as.antsMatrix(object, elementtype = "float")
# S4 method for class 'matrix'
as.antsMatrix(object, elementtype = "float")
as.antsMatrix(matrix(rnorm(10), nrow = 2))
#> An object of class "antsMatrix"
#> Slot "elementtype":
#> [1] "float"
#>
#> Slot "pointer":
#> <pointer: 0x600003db1480>
#>
mat <- matrix(rnorm(10), nrow = 2)
df <- as.data.frame(mat)
as.antsMatrix(df)
#> An object of class "antsMatrix"
#> Slot "elementtype":
#> [1] "float"
#>
#> Slot "pointer":
#> <pointer: 0x600003db1d00>
#>
as.antsMatrix(as.list(df))
#> An object of class "antsMatrix"
#> Slot "elementtype":
#> [1] "float"
#>
#> Slot "pointer":
#> <pointer: 0x600003db2680>
#>