Displaying 1 result from an estimated 1 matches for "domatrix".
Did you mean:
dmatrix
2013 Apr 12
2
processing matrix equation derived from rows of two matrices
...r the first sample
#check
>tryvarb<-c(1,2,3,4,4,4,4)
>var(tryvarb)
?
#Now I try to get the variance for each sample (row) in tb, but neither of the following attempts work.
>trybase <- apply(tb,1,function(i)
? >t(base79[,i])%*%(((val-rep(meansb79[i,],5))^2)/6))
#or
>domatrix.f <- function(tb, meansb79) {
? > ? a <- nrow(A); b <- nrow(B);
? ? >C <- matrix(NA, nrow=a, ncol=b);
? ? >for (i in 1:a)
? ?? > for (j in 1:b)
? ? ?? > C[i,j] <- t(A[,i])%*%(((val-rep(B[i,],5))^2)/6) }
>domatrix.f(tb, meansb79)