Skip to content

Commit

Permalink
Ensure named character is returned by mapIds (issue #100)
Browse files Browse the repository at this point in the history
  • Loading branch information
jorainer committed Aug 23, 2019
1 parent b018701 commit 36d325d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: ensembldb
Type: Package
Title: Utilities to create and use Ensembl-based annotation databases
Version: 2.9.4
Version: 2.9.5
Authors@R: c(person(given = "Johannes", family = "Rainer",
email = "[email protected]",
role = c("aut", "cre"),
Expand Down
2 changes: 1 addition & 1 deletion R/select-methods.R
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ setMethod("mapIds", "EnsDb", function(x, keys, column, keytype, ..., multiVals)
vals <- split(res[, 2], f = factor(res[, 1],
levels = unique(theNames)))
vals <- unlist(vals[lengths(vals) == 1])
if (length(vals)) vals else character()
if (length(vals)) vals else setNames(nm = character())
},
asNA = {
## Split the vector, set all those with multi mappings NA.
Expand Down

0 comments on commit 36d325d

Please sign in to comment.