From 2a84c8ddbd06a6c0f925191dc12ba515de976404 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roland=20Holl=C3=B3s?= Date: Wed, 19 Sep 2018 12:15:11 +0200 Subject: [PATCH] namespace and variable name bugfixes in plotMuso function --- RBBGCMuso/DESCRIPTION | 2 +- RBBGCMuso/NAMESPACE | 1 + RBBGCMuso/R/plotMuso.R | 8 +++++--- RBBGCMuso/man/calibMuso.Rd | 2 ++ RBBGCMuso/man/plotMuso.Rd | 4 ++++ 5 files changed, 13 insertions(+), 4 deletions(-) diff --git a/RBBGCMuso/DESCRIPTION b/RBBGCMuso/DESCRIPTION index e5e71b8..8e22d99 100644 --- a/RBBGCMuso/DESCRIPTION +++ b/RBBGCMuso/DESCRIPTION @@ -23,7 +23,7 @@ Imports: tidyr LinkingTo: Rcpp Maintainer: Roland Hollo's -RoxygenNote: 6.0.1 +RoxygenNote: 6.1.0 Suggests: knitr, rmarkdown, VignetteBuilder: knitr diff --git a/RBBGCMuso/NAMESPACE b/RBBGCMuso/NAMESPACE index 60b59cd..0625150 100644 --- a/RBBGCMuso/NAMESPACE +++ b/RBBGCMuso/NAMESPACE @@ -26,6 +26,7 @@ import(grDevices) import(graphics) import(magrittr) import(stats) +import(tidyr) import(utils) importFrom(Rcpp,evalCpp) useDynLib(RBBGCMuso) diff --git a/RBBGCMuso/R/plotMuso.R b/RBBGCMuso/R/plotMuso.R index 6e5da4c..0d5edd4 100644 --- a/RBBGCMuso/R/plotMuso.R +++ b/RBBGCMuso/R/plotMuso.R @@ -21,7 +21,9 @@ #' debugging=FALSE, keepEpc=FALSE, #' logfilename=NULL, aggressive=FALSE, #' leapYear=FALSE, export=FALSE) -#' @import ggplot2, dplyr +#' @import ggplot2 +#' @import dplyr +#' @import tidyr #' @export plotMuso <- function(settings=NULL, @@ -96,7 +98,7 @@ plotMuso <- function(settings=NULL, } p } else { - p <- baseData %>% + p <- musoData %>% select(c("date", variableName))%>% gather(., key= outputs, value = bla, variableName) %>% # head %>% @@ -119,7 +121,7 @@ plotMuso <- function(settings=NULL, } p } else{ - p <- baseData %>% + p <- musoData %>% select(c("date",variableName))%>% gather(., key= outputs, value = bla,variableName) %>% # head %>% diff --git a/RBBGCMuso/man/calibMuso.Rd b/RBBGCMuso/man/calibMuso.Rd index df2adcc..40391dc 100644 --- a/RBBGCMuso/man/calibMuso.Rd +++ b/RBBGCMuso/man/calibMuso.Rd @@ -33,6 +33,8 @@ keepEpc=FALSE, export=FALSE, silent=FALSE, aggressive=FALSE, leapYear=FALSE) \item{binaryPlace}{The place of the binary output files.} \item{fileToChange}{You can change any line of the epc or the ini file, you just have to specify with this variable which file you van a change. Two options possible: "epc", "ini"} + +\item{skipSpinup}{If TRUE, calibMuso wont do spinup simulation} } \value{ No return, outputs are written to file diff --git a/RBBGCMuso/man/plotMuso.Rd b/RBBGCMuso/man/plotMuso.Rd index 738e9f1..5c26ebe 100644 --- a/RBBGCMuso/man/plotMuso.Rd +++ b/RBBGCMuso/man/plotMuso.Rd @@ -29,6 +29,10 @@ leapYear=FALSE, export=FALSE) \item{leapYear}{Should the function do a leapyear correction on the outputdata? If TRUE, then the 31.12 day will be doubled.} +\item{plotType}{There are two options now: continious time series("cts") or disctrete time series("dts")} + +\item{skipSpinup}{If TRUE, calibMuso wont do spinup simulation} + \item{export}{if it is yes or you give a filename here, it converts the output to the specific extension. For example, if you set export to "example.csv", it converts the output to "csv", if you set it to "example.xls" it converts to example.xls with the xlsx package. If it is not installed it gives back a warning message and converts it to csv.} } \value{