https://github.com/edelweiss611428/dissimilarities
An R Package for Creating, Manipulating, and Subsetting "dist" Objects
https://github.com/edelweiss611428/dissimilarities
cluster-analysis distance-matrix
Last synced: 3 months ago
JSON representation
An R Package for Creating, Manipulating, and Subsetting "dist" Objects
- Host: GitHub
- URL: https://github.com/edelweiss611428/dissimilarities
- Owner: edelweiss611428
- License: cc-by-4.0
- Created: 2025-04-24T14:38:06.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2025-07-20T13:12:21.000Z (11 months ago)
- Last Synced: 2025-10-22T05:45:08.683Z (7 months ago)
- Topics: cluster-analysis, distance-matrix
- Language: R
- Homepage: https://cran.r-project.org/web/packages/dissimilarities/index.html
- Size: 552 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Welcome to dissimilarities
[](https://github.com/edelweiss611428/dissimilarities/actions/workflows/R-CMD-check.yaml) [](https://GitHub.com/edelweiss611428/dissimilarities/graphs/commit-activity) [](https://edelweiss611428.r-universe.dev/dissimilarities)
[](https://CRAN.R-project.org/package=dissimilarities)
[](https://CRAN.R-project.org/package=dissimilarities)[](https://codecov.io/gh/edelweiss611428/dissimilarities)
### Description
The package provides efficient and user-friendly functions for creating, manipulating, and subsetting "dist" objects, which are commonly used in clustering applications in R.
The current version includes the following features:
- **Dist2Mat**: Converting a "dist" object to a numeric matrix.
- **subDist2Dist**: Subsetting a "dist" object to a "dist" object.
- **subDist2Mat**: Subsetting a "dist" object to a numeric "matrix".
- **subCols**: Subsetting a "dist" object to a numeric "matrix" based on some column (equivalently, row) indices.
- **fastDist**: Computing a "dist" object given a numeric matrix.
- **fastDistAB**: Computing a numeric "matrix" storing pairwise distances between rows in two matrices.
- **get2dFrom1d**: Computing 2D-indexing given 1D-indexing (as used in R's "dist" objects).
- **get1dFrom2d**: Computing 1D-indexing given 2D-indexing (a row-column pair).
- **expandDist**: Expanding a "dist" object given new data.
Feature(s) under development:
- Providing additional distance functions in fastDist and fastDistAB. The current version only supports popular metrics, namely "euclidean", "manhattan", "minkowski", "maximum", "canberra", and "cosine".
### Installation
To download the newest version of the package, use the following R code:
```r
library(devtools)
install_github("edelweiss611428/dissimilarities")
```