Permalink
Browse files

Fixed little bug in logic when checking for missing labels

  • Loading branch information...
daudi committed Jun 19, 2011
1 parent 70b0b93 commit f5519e5cb8a7a75f8adef1d87fbf4db82979d80a
Showing with 1 addition and 1 deletion.
  1. +1 −1 read-epidata.R
View
@@ -349,7 +349,7 @@ epidata.value.label <- function(x, value.labels, label.set) {
this.val <- NA
} else {
i <- as.character(value.labels[[label.set]]$labels$value) == as.character(x[j])
- if (i) {
+ if (any(i)) {
this.val <- as.character(value.labels[[label.set]]$labels$label[i])
} else {
missing.levels <- unique(c(missing.levels, as.character(x[j])))

0 comments on commit f5519e5

Please sign in to comment.