aboutsummaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
Diffstat (limited to 'pkg')
-rw-r--r--pkg/DESCRIPTION4
-rw-r--r--pkg/R/TOXSWA_cwa.R11
2 files changed, 11 insertions, 4 deletions
diff --git a/pkg/DESCRIPTION b/pkg/DESCRIPTION
index 08afb22..a6880f2 100644
--- a/pkg/DESCRIPTION
+++ b/pkg/DESCRIPTION
@@ -1,8 +1,8 @@
Package: pfm
Type: Package
Title: Utilities for pesticide fate modelling
-Version: 0.1-2
-Date: 2015-04-24
+Version: 0.1-3
+Date: 2015-05-07
Authors@R: person("Johannes Ranke", email = "jranke@uni-bremen.de",
role = c("aut", "cre", "cph"))
Description: Utilities for simple PEC calculations and for dealing with data
diff --git a/pkg/R/TOXSWA_cwa.R b/pkg/R/TOXSWA_cwa.R
index bb45a4b..948d7a9 100644
--- a/pkg/R/TOXSWA_cwa.R
+++ b/pkg/R/TOXSWA_cwa.R
@@ -97,8 +97,15 @@ plot.TOXSWA_cwa <- function(x, time_column = c("datetime", "t", "t_firstjan", "t
if (add) {
lines(x$cwas[c(time_column, cwa_column)], xlab = xlab, ylab = ylab, ...)
} else{
- plot(x$cwas[c(time_column, cwa_column)], type = "l",
- xlab = xlab, ylab = ylab, ...)
+ if (time_column == "datetime") {
+ plot(x$cwas$datetime, x$cwas[[cwa_column]], type = "l",
+ xlab = xlab, ylab = ylab, xaxt = "n", ...)
+ seq_x <- seq(min(x$cwas$datetime), max(x$cwas$datetime), by = "quarter")
+ axis(1, at = seq_x, labels = format(seq_x, "%b %Y"))
+ } else {
+ plot(x$cwas[c(time_column, cwa_column)], type = "l",
+ xlab = xlab, ylab = ylab, ...)
+ }
}
tmp <- Sys.setlocale("LC_TIME", lct)
}

Contact - Imprint