Displaying 1 result from an estimated 1 matches for "td_matrix".
Did you mean:
tdm_matrix
2007 Jul 14
0
Extending Matrix class
...do not know in advance what the
IF> matrix "m" actually is (we only know it is *some*
IF> Matrix, e.g., we do not know if it is a dgCMatrix or a
IF> lgCMatrix or ...). Is there a (simple) solution?
Well, yes, but probably not the one you had wanted:
setClass("TD_Matrix",
representation(data = "Matrix", Weighting = "character"))
A <- spMatrix(10,20, i = c(1,3:8),
j = c(2,9,6:10),
x = 7 * (1:7))
tdr <- new("TD_Matrix", data = A, Weighting = "foobar")
tdr
----------------
Now...