Skip to content

Commit

Permalink
Merge branch 'master' into DS-4045
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisfacer committed Dec 12, 2022
2 parents 926e9f5 + 0679c5d commit e34261d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
7 changes: 5 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ before_install:
- rcode+="line.fail <- max(grep('FAIL', out)); "
- rcode+="tmp <- unlist(strsplit(split='[[:space:]]+', out[line.fail])); "
- rcode+="pos.fail <- grep('FAIL', tmp); n.fail <- as.numeric(tmp[pos.fail+1]); "
- rcode+="res <- as.data.frame(res); out <- data.frame(file = unlist(res[['file']]), warning = unlist(res[['warning']])); "
- rcode+="write.csv(out, file='test_results.csv'); "
- rcode+="res <- as.data.frame(res);"
- rcode+="out <- data.frame(fail = res[['failed']] + res[['error']], file = unlist(res[['file']]), warning = unlist(res[['warning']])); "
- rcode+="write.csv(out, file='test_results.csv', row.names = FALSE); "
- rcode+="quit(status = !identical(n.fail, 0), save='no');"
- Rscript tools/travis_run_before_install.R

Expand Down Expand Up @@ -61,3 +62,5 @@ notifications:
after_success:
- Rscript -e "require(flipDevTools); NotifyWarnings(); TriggerDownstreamBuilds()"
- travis_wait Rscript -e "flipDevTools::CheckCoverage()"
after_failure:
- Rscript -e "require(flipDevTools); NotifyWarnings()"
6 changes: 3 additions & 3 deletions R/mergedatasetsbycase.R
Original file line number Diff line number Diff line change
Expand Up @@ -2219,7 +2219,7 @@ mergeValueAndLabelIntoValueAttributes <- function(val, lbl, merged.val.attr,
if (is.fuzzy.match)
{
merged.val <- unname(original.val.attr[which.max(match.percentages)])
if (merged.val != val)
if (identical(merged.val, val))
{
map <- rbind(map, c(val, merged.val), deparse.level = 0) # use the value in original.val.attr
}
Expand Down Expand Up @@ -2287,7 +2287,7 @@ convertTextVariableToCategorical <- function(text.var, merged.val.attr)
else # not found in merged.val.attr, add as numeric value
{
new.ind <- length(merged.val.attr) + 1
new.val <- ceiling(max(merged.val.attr)) + 1
new.val <- ceiling(max(merged.val.attr, na.rm = TRUE)) + 1
merged.val.attr[new.ind] <- new.val
names(merged.val.attr)[new.ind] <- text.val
categorical.var.values[text.val == text.var] <- new.val
Expand Down Expand Up @@ -2642,7 +2642,7 @@ isLabelDuplicated <- function(lbl, val.attrs.list)
newUniqueValue <- function(val.attrs.list, merged.val.attr)
{
combined.val.attrs.list <- c(val.attrs.list, list(merged.val.attr))
ceiling(max(unlist(combined.val.attrs.list))) + 1
ceiling(max(unlist(combined.val.attrs.list), na.rm = TRUE)) + 1
}

# Convenience function: seq_len of nrow of matrix m
Expand Down

0 comments on commit e34261d

Please sign in to comment.