{"id":15373703,"url":"https://github.com/krlmlr/mangow","last_synced_at":"2026-01-31T07:03:23.058Z","repository":{"id":26023897,"uuid":"29466768","full_name":"krlmlr/mangow","owner":"krlmlr","description":"Generate a Manhattan Distance problem from a Gower's distance problem","archived":false,"fork":false,"pushed_at":"2020-01-01T12:29:10.000Z","size":169,"stargazers_count":2,"open_issues_count":6,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-22T04:40:33.402Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://krlmlr.github.io/mangow","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/krlmlr.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-01-19T11:00:42.000Z","updated_at":"2022-08-03T14:23:14.000Z","dependencies_parsed_at":"2022-08-24T14:19:32.210Z","dependency_job_id":null,"html_url":"https://github.com/krlmlr/mangow","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/krlmlr/mangow","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krlmlr%2Fmangow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krlmlr%2Fmangow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krlmlr%2Fmangow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krlmlr%2Fmangow/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/krlmlr","download_url":"https://codeload.github.com/krlmlr/mangow/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krlmlr%2Fmangow/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28932602,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-31T04:05:25.756Z","status":"ssl_error","status_checked_at":"2026-01-31T04:02:35.005Z","response_time":128,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-01T13:56:06.299Z","updated_at":"2026-01-31T07:03:23.040Z","avatar_url":"https://github.com/krlmlr.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\noutput: github_document\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  out.width = \"100%\"\n)\n\npkgload::load_all()\n```\n\n# mangow\n\n\u003c!-- badges: start --\u003e\n[![Travis build status](https://travis-ci.org/krlmlr/mangow.svg?branch=master)](https://travis-ci.org/krlmlr/mangow)\n[![codecov.io](https://codecov.io/github/krlmlr/mangow/coverage.svg?branch=master)](https://codecov.io/github/krlmlr/mangow?branch=master)\n[![Lifecycle: stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://www.tidyverse.org/lifecycle/#stable)\n[![CRAN status](https://www.r-pkg.org/badges/version/mangow)](https://CRAN.R-project.org/package=mangow)\n\u003c!-- badges: end --\u003e\n\nThe goal of mangow is to normalize provide a transformation from Gower to Manhattan distance.\nThe only exported function in this package converts a data frame to an equivalent matrix where the pairwise Gower distances in the input data frame are identical to the pairwise Manhattan distances in the resulting matrix.\nWith this transformation, efficient algorithms for the Manhattan distance, such as nearest-neighbor for L1, can be extended to work with Gower distances.\n\n## Installation\n\nYou can install the released version of mangow from [CRAN](https://CRAN.R-project.org) with:\n\n``` r\ninstall.packages(\"mangow\")\n```\n\nAnd the development version from [GitHub](https://github.com/) with:\n\n``` r\n# install.packages(\"devtools\")\ndevtools::install_github(\"krlmlr/mangow\")\n```\n\n## Example\n\nThis basic example computes a Gower dissimilarity matrix on a subset of the Iris data and compares it with the L1 dissimilarity matrix of the transformed data.\n\n```{r read}\niris_sub \u003c- iris[c(1:2, 50:51, 100:101), ]\nrow.names(iris_sub) \u003c- NULL\niris_sub\n\ncluster::daisy(iris_sub, metric = \"gower\")\n```\n\nThe transformation returns a matrix with the same number of rows, but potentially more columns, depending on the data types of the input columns.\n\n```{r transform}\nlibrary(mangow)\n\nmangow_iris_sub \u003c- mangow(iris_sub)\nmangow_iris_sub\n```\n\nThe resulting dissimilarity matrix for the Manhattan metric is the same as the Gower dissimilarity matrix on the input.\n\n```{r daisy}\ncluster::daisy(mangow_iris_sub, metric = \"manhattan\")\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrlmlr%2Fmangow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkrlmlr%2Fmangow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrlmlr%2Fmangow/lists"}