| dist | R Documentation |
This function replicates the DIST command in the DELTA system for generating a distance matrix using Gower's coefficient. It creates the necessary directives files and runs the CONFOR and DIST programs.
dist(
delta,
heading = NULL,
match_overlap = FALSE,
minimum_comparisons,
phylip_format = FALSE,
exclude_items = NULL,
exclude_characters = NULL,
remove_temp = TRUE
)
delta |
A Delta dataset object (created by |
heading |
Heading for the output (default = NULL, uses heading from specs file) |
match_overlap |
For unordered multistate characters, the contribution of a character to the distance between two items is 0 if the items have any of the values of the character in common (default = FALSE) |
minimum_comparisons |
Minimum number of character comparisons required to calculate the distance between two items (default = ceiling(sqrt(number of included characters))) |
phylip_format |
Causes the taxon names to be interleaved with the rows of the distance matrix, as required by the program Phylip (default = FALSE) |
exclude_items |
A list of items to be excluded (default = NULL) |
exclude_characters |
A list of characters to be excluded (default = NULL) |
remove_temp |
Logical; if TRUE, remove temporary files after conversion |
The function assumes that the CONFOR and DIST program executables are available in the system PATH or in the current working directory.
Invisibly returns 0 on success
# Requires the CONFOR and DIST executables on the PATH.
try({
delta <- load_delta(
system.file("extdata", "chars_viola", package = "RDelta"),
system.file("extdata", "items_viola", package = "RDelta"),
system.file("extdata", "specs_viola", package = "RDelta")
)
dist(delta)
dist(delta, match_overlap = TRUE, phylip_format = TRUE,
minimum_comparisons = 10)
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.