Displaying 1 result from an estimated 1 matches for "multracefun".
2008 Jan 14
2
as.function()
Hi
[this after some considerable thought as to R-help vs R-devel]
I want to write a (S3) method for as.function();
toy example follows.
Given a matrix "a", I need to evaluate trace(ax) as a function of
(matrix) "x".
Here's a trace function:
tr <- function (a) {
i <- seq_len(nrow(a))
return(sum(a[cbind(i, i)]))
}
How do I accomplish the following: