Coerce 3-vectors and 4-vectors to a matrix
as.matrix.RdCoerce 3-vectors and 4-vectors to a matrix. A convenience wrapper for
unclass()
Examples
as.matrix(r3vel(5))
#> x y z
#> [1,] -0.7307381 0.31106040 0.07505563
#> [2,] 0.3671914 -0.53243243 0.58310205
#> [3,] 0.2585482 0.05196736 -0.75516773
#> [4,] 0.4613558 -0.81911233 -0.05767206
#> [5,] -0.6158693 -0.34428984 0.54508946
as.matrix(r4vel(5))
#> t x y z
#> [1,] 1.781641 0.7575614 -0.61847159 1.103557543
#> [2,] 1.291011 -0.1718347 0.02711969 -0.797776513
#> [3,] 4.268227 -1.3235280 -2.25489882 3.222027747
#> [4,] 3.323867 -0.2852685 -0.25477742 3.146713064
#> [5,] 1.285970 -0.6272795 0.51013652 0.000309668