powered by
Create a matrix
modMATRIX( x, use = TRUE, block = FALSE, correlation = FALSE, digits = -1, context = "matlist", ... )
data for building the matrix. Data in x are assumed to be on-diagonal elements if block is FALSE and lower-triangular elements if block is TRUE
x
block
FALSE
TRUE
logical; if FALSE, all matrix elements are set to 0
logical; if TRUE, try to make a block matrix; diagonal otherwise
logical; if TRUE, off diagonal elements are assumed to be correlations and converted to covariances; if correlation is TRUE, then block is set to TRUE
if value of this argument is greater than zero, the matrix is passed to signif (along with digits) prior to returning
the working context
passed along
# NOT RUN { modMATRIX("1 2.2 333") modMATRIX("1 1.1 2.2", block=TRUE) modMATRIX("23 234 234 5234", use=FALSE) ans <- modMATRIX("1.1 0.657 2.2", correlation=TRUE, block=TRUE) ans cov2cor(ans) # }
Run the code above in your browser using DataLab