# NOT RUN {
# Generate a data set consisting of 10 rows and 200 columns,
# where the values are randomly drawn from the integers 1, 2, and 3.
mat <- matrix(sample(3, 2000, TRUE), 10)
# For each pair of rows of mat, the value of the corrected Pearson's
# contingency coefficient is then obtained by
out1 <- pcc(mat)
out1
# and the distances based on this coefficient by
out2 <- pcc(mat, dist = TRUE)
out2
# Note that if version is set to 1 (default) in pcc, then
all.equal(sqrt(1 - out1^2), out2)
# }
Run the code above in your browser using DataLab