diff --git a/DESCRIPTION b/DESCRIPTION index dbba4303..ce3b5829 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: dodgr Title: Distances on Directed Graphs -Version: 0.4.0.013 +Version: 0.4.0.014 Authors@R: c( person("Mark", "Padgham", , "mark.padgham@email.com", role = c("aut", "cre")), person("Andreas", "Petutschnig", role = "aut"), diff --git a/R/dists.R b/R/dists.R index 3b4575aa..be0945e7 100644 --- a/R/dists.R +++ b/R/dists.R @@ -227,7 +227,8 @@ get_index_id_cols <- function (graph, is.matrix (pts) || is.data.frame (pts)) { index <- get_pts_index (graph, gr_cols, vert_map, pts) - if (is.matrix (pts) || is.data.frame (pts)) { + if ((is.matrix (pts) || is.data.frame (pts)) && + !any (duplicated (index))) { rownames (pts) <- vert_map$vert [index] } } else { diff --git a/codemeta.json b/codemeta.json index 28c017f1..5957c9ff 100644 --- a/codemeta.json +++ b/codemeta.json @@ -11,7 +11,7 @@ "codeRepository": "/~https://github.com/UrbanAnalyst/dodgr", "issueTracker": "/~https://github.com/UrbanAnalyst/dodgr/issues", "license": "https://spdx.org/licenses/GPL-3.0", - "version": "0.4.0.013", + "version": "0.4.0.014", "programmingLanguage": { "@type": "ComputerLanguage", "name": "R",