Skip to content

Commit

Permalink
bugfix write.reportProject
Browse files Browse the repository at this point in the history
  • Loading branch information
flohump committed Oct 4, 2019
1 parent 35f6db4 commit 8eeff26
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: magclass
Type: Package
Title: Data Class and Tools for Handling Spatial-Temporal Data
Version: 5.1.0
Date: 2019-09-30
Version: 5.1.1
Date: 2019-10-04
Authors@R: c(person("Jan Philipp", "Dietrich", email = "dietrich@pik-potsdam.de", role = c("aut","cre")),
person("Benjamin Leon", "Bodirsky", email = "bodirsky@pik-potsdam.de", role = "aut"),
person("Markus", "Bonsch", role = "aut"),
Expand Down Expand Up @@ -49,4 +49,4 @@ LazyData: true
Encoding: UTF-8
RoxygenNote: 6.1.1
VignetteBuilder: knitr
ValidationKey: 9266190
ValidationKey: 9286403
4 changes: 2 additions & 2 deletions R/write.reportProject.R
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,10 @@ write.reportProject <- function(mif,mapping,file=NULL,max_file_size=NULL,format=
write.report2(new_data,file=file,...)
} else if (format == "IAMC") {
a <- write.report2(new_data,file=NULL,...)
write.csv(a[[1]][[1]],file=file,row.names = FALSE,quote = FALSE)
write.csv(a,file=file,row.names = FALSE,quote = FALSE)
} else if (format == "AgMIP") {
a <- write.report2(new_data,file=NULL,extracols = "Item")
b<-melt(a[[1]][[1]],id.vars = c("Model","Scenario","Region","Variable","Item","Unit"),variable.name = "Year")
b<-melt(a,id.vars = c("Model","Scenario","Region","Variable","Item","Unit"),variable.name = "Year")
write.csv(b,file=file,row.names = FALSE,quote = FALSE)
}

Expand Down

0 comments on commit 8eeff26

Please sign in to comment.