From 8ffbc49b3f01deac6f9e83aaa6d318d4e2f8552b Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Fri, 23 Jan 2015 16:44:04 +0100 Subject: Add option to plot relative to maximum --- pkg/DESCRIPTION | 2 +- pkg/R/TOXSWA_cwa.R | 5 +++-- pkg/man/plot.TOXSWA_cwa.Rd | 6 +++--- 3 files changed, 7 insertions(+), 6 deletions(-) (limited to 'pkg') diff --git a/pkg/DESCRIPTION b/pkg/DESCRIPTION index b360eea..29e36e7 100644 --- a/pkg/DESCRIPTION +++ b/pkg/DESCRIPTION @@ -2,7 +2,7 @@ Package: pfm Type: Package Title: Utilities for pesticide fate modelling Version: 0.1-1 -Date: 2015-01-13 +Date: 2015-01-23 Authors@R: "Johannes Ranke [aut, cre, cph]" Description: Utilities for dealing with data from FOCUS software tools. Depends: R6 diff --git a/pkg/R/TOXSWA_cwa.R b/pkg/R/TOXSWA_cwa.R index 8c93183..bb45a4b 100644 --- a/pkg/R/TOXSWA_cwa.R +++ b/pkg/R/TOXSWA_cwa.R @@ -75,7 +75,7 @@ read.TOXSWA_cwa <- function(filename, basedir = ".", zipfile = NULL, #' zipfile = system.file("testdata/SwashProjects.zip", #' package = "pfm")) #' plot(H_sw_D4_pond) -plot.TOXSWA_cwa <- function(x, time_column = c("datetime", "t", "t_firstjan"), +plot.TOXSWA_cwa <- function(x, time_column = c("datetime", "t", "t_firstjan", "t_rel_to_max"), xlab = "default", ylab = "default", add = FALSE, total = FALSE, LC_TIME = "C", ...) @@ -88,7 +88,8 @@ plot.TOXSWA_cwa <- function(x, time_column = c("datetime", "t", "t_firstjan"), xlab = switch(time_column, datetime = "Time", t = "Time [days]", - t_firstjan = "Time since first of January [days]") + t_firstjan = "Time since first of January [days]", + t_rel_to_max = "Time relative to maximum concentration [days]") } if (ylab == "default") { ylab = paste( ifelse(total, "Total concentration", "Concentration"), "[\u03bcg/L]") diff --git a/pkg/man/plot.TOXSWA_cwa.Rd b/pkg/man/plot.TOXSWA_cwa.Rd index 640f65d..9136c10 100644 --- a/pkg/man/plot.TOXSWA_cwa.Rd +++ b/pkg/man/plot.TOXSWA_cwa.Rd @@ -4,9 +4,9 @@ \alias{plot.TOXSWA_cwa} \title{Plot TOXSWA surface water concentrations} \usage{ -\method{plot}{TOXSWA_cwa}(x, time_column = c("datetime", "t", "t_firstjan"), - xlab = "default", ylab = "default", add = FALSE, total = FALSE, - LC_TIME = "C", ...) +\method{plot}{TOXSWA_cwa}(x, time_column = c("datetime", "t", "t_firstjan", + "t_rel_to_max"), xlab = "default", ylab = "default", add = FALSE, + total = FALSE, LC_TIME = "C", ...) } \arguments{ \item{x}{The TOXSWA_cwa object to be plotted.} -- cgit v1.2.1