do_CMDS | R Documentation |
Perform classical multidimensional scaling (CMDS) on a distance matrix and plot the result. CMDS computes a set of points such that the distances between them approximate those of the distance matrix. The maximum number of dimensions of the points is set to three. The fraction of variance explained by the model is calculated and printed as the R-squared value.
do_CMDS(dm, write = FALSE, fp = "output/CMDS/", fn = "output")
dm |
A distance matrix. |
write |
logical flag: (default = FALSE) if TRUE then a plot will be written to file fn. |
fp |
a character string naming the file path to write to. |
fn |
a character string specifying the file name prefix (".gif" will be appended). |
A list of coordinates, eigenvalues, and other parameters as described in stats::cmdscale().
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.