cloneMatrix | R Documentation |
Useful when calling ERE_step_cycle
or
GibbsSteps_kcycle
to ensure that
there are no side effects for the return values.
cloneMatrix(M)
M |
A matrix |
A deep copy of the matrix.
lambda <- matrix(0.5,nrow=2,ncol=2)
p <- matrix(0.7, nrow=2,ncol=2)
L <- matrix(rexp(4),nrow=2);
L
Lold <- L
Lcopy <- cloneMatrix(L)
ERE_step_cycle(r=c(0,1),c=c(0,1),L=L,lambda=lambda,p=p)
L ## new value
Lold ## equal to L !!!
Lcopy ## still has the original value
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.