| constructCor | R Documentation | 
Different types of correlations can be requested: PMC, Kendall tau rank correlation, Spearman rank correlation.
constructCor(
  x,
  method = c("pearson", "kendall", "spearman"),
  trim = 20,
  index = FALSE
)
| x | 
 | 
| method | A character string indicating which correlation coefficient
is to be computed. One of  | 
| trim | The number of characters a construct is trimmed to (default is
 | 
| index | Whether to print the number of the construct. | 
Returns a matrix of construct correlations.
elementCor()
# three different types of correlations
constructCor(mackay1992)
constructCor(mackay1992, method = "kendall")
constructCor(mackay1992, method = "spearman")
# format output
constructCor(mackay1992, trim = 6)
constructCor(mackay1992, index = TRUE, trim = 6)
# save correlation matrix for further processing
r <- constructCor(mackay1992)
r
print(r, digits = 5)
# accessing the correlation matrix
r[1, 3]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.