correlation_matrix | R Documentation |
Given a set of values, convert it to a correlation matrix.
correlation_matrix( ..., .names = NULL, .upper = NULL, .byrow = TRUE, .check = TRUE )
... |
A series of values or dots for the correlation matrix. Only the
value in the upper triangle or lower triangle (not both) should be used.
Use |
.names |
The name of the variables. |
.upper |
A vector of values for the upper triangle values
filled by row (or column if |
.byrow |
A logical value indicating whether the matrix is filled by
row or column. The default is |
.check |
A logical value to indicate if the correlation matrix is valid or not. This essentially equates to check that the matrix is semi-positive definite. |
cor_matrix_str
Other correlation matrix:
cor_matrix_str()
correlation_matrix(., 0.7, ., ., ., ., ., 0.3, ., ., ., ., ., ., ., .) correlation_matrix(.upper = c(0.7, 0.1, 0.3, 0.2, -0.1, -0.3)) correlation_matrix(.upper = c(0.7, 0.1, 0.3, 0.2, -0.1, -0.3), .byrow = FALSE) correlation_matrix(.upper = rep(0.2, 3), .names = c("A", "B", "C"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.