Skip to content

Commit

Permalink
bugfix in calculation of non-matching objects
Browse files Browse the repository at this point in the history
  • Loading branch information
tscheypidi committed Oct 6, 2017
1 parent 9e4a1b6 commit 8557058
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: mip
Type: Package
Title: Comparison of multi-model runs
Version: 0.97.2
Date: 2017-09-29
Version: 0.97.3
Date: 2017-10-06
Author: David Klein, Benjamin Leon Bodirsky, Florian Humpenoeder, Lavinia Baumstark, Jerome Hilaire
Maintainer: David Klein <[email protected]>
Description: Package contains generic functions to produce comparison plots of multi-model runs.
Expand Down
8 changes: 4 additions & 4 deletions R/validationpdf.R
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,17 @@ validationpdf <- function(x,hist,file="validation.pdf",style="comparison", only_
x$fullname <- paste0(x$variable, " (",x$unit,")")
hist$fullname <- paste0(hist$variable, " (",hist$unit,")")

#vars <- intersect(x$fullname,hist$fullname)
vars <- x$fullname
xtrax <- setdiff(x$fullname,hist$fullname)
xtrahist <- setdiff(hist$fullname,x$fullname)


remove_symbols <- function(x) return(gsub("(\\++|\\-+)\\|","", x))
extract_symbols <- function(x) return(gsub("(\\+|\\-)\\|","\\1",gsub("[^\\|^\\+^\\-]*","",x)))

x$fullname <- as.factor(remove_symbols(x$fullname))
hist$fullname <- as.factor(remove_symbols(hist$fullname))

xtrax <- setdiff(x$fullname,hist$fullname)
xtrahist <- setdiff(hist$fullname,x$fullname)

x$variable <- remove_symbols(x$variable)
hist$variable <- remove_symbols(hist$variable)

Expand Down

0 comments on commit 8557058

Please sign in to comment.