View source: R/unsupervised-mds.R
| tidy_mds | R Documentation |
Unified interface for MDS methods with tidy output
tidy_mds(data, method = "classical", ndim = 2, distance = "euclidean", ...)
data |
A data frame, tibble, or distance matrix |
method |
Character; "classical" (default), "metric", "nonmetric", "sammon", or "kruskal" |
ndim |
Number of dimensions for output (default: 2) |
distance |
Character; distance metric if data is not already a dist object (default: "euclidean") |
... |
Additional arguments passed to specific MDS functions |
A list of class "tidy_mds" containing:
config: tibble of MDS configuration (coordinates)
stress: goodness-of-fit measure (if applicable)
method: character string of method used
model: original model object
# Classical MDS
mds_result <- tidy_mds(eurodist, method = "classical")
print(mds_result)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.