Skip to content

Commit

Permalink
fix bug in 'get_index_id_cols' for #229
Browse files Browse the repository at this point in the history
  • Loading branch information
mpadge committed Jun 6, 2024
1 parent 021664e commit bc7f205
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -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"),
Expand Down
3 changes: 2 additions & 1 deletion R/dists.R
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit bc7f205

Please sign in to comment.