Specify either a symmetric distance matrix or the file from which to read the matrix. See www.corehunter.org for documentation and examples of the distance matrix file format used by Core Hunter.
Symmetric distance matrix. Unique row and column headers are required,
should be the same and are used as item ids. Can be a
File from which to read the distance matrix.
Distance matrix data of class
chdist with elements
Distance matrix (
Number of individuals in the dataset.
Unique item identifiers.
Item names. Names of individuals to which no explicit name
has been assigned are equal to the unique
Java version of the data object.
Normalized path of file from which data was read (if applicable).
1 2 3 4 5 6 7 8 9 10 11 12 13
# create from distance matrix m <- matrix(runif(100), nrow = 10, ncol = 10) diag(m) <- 0 # make symmetric m[lower.tri(m)] <- t(m)[lower.tri(m)] # set headers rownames(m) <- colnames(m) <- paste("i", 1:10, sep = "-") dist <- distances(m) # read from file dist.file <- system.file("extdata", "distances.csv", package = "corehunter") dist <- distances(file = dist.file)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.