From b052bf8d1e090e07bf0853f0aa8b895db8f41a2a Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Wed, 29 Mar 2017 19:24:37 +0200 Subject: Make it possible to use expressions in axis labels --- R/TOXSWA_cwa.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'R') diff --git a/R/TOXSWA_cwa.R b/R/TOXSWA_cwa.R index 8de18a4..2985e1f 100644 --- a/R/TOXSWA_cwa.R +++ b/R/TOXSWA_cwa.R @@ -97,14 +97,14 @@ plot.TOXSWA_cwa <- function(x, time_column = c("datetime", "t", "t_firstjan", "t cwa_column = ifelse(total, "cwa_tot_mug_per_L", "cwa_mug_per_L") lct <- Sys.getlocale("LC_TIME") tmp <- Sys.setlocale("LC_TIME", LC_TIME) - if (xlab == "default") { + if (identical(xlab, "default")) { xlab = switch(time_column, datetime = "Time", t = "Time [days]", t_firstjan = "Time since first of January [days]", t_rel_to_max = "Time relative to maximum concentration [days]") } - if (ylab == "default") { + if (identical(ylab, "default")) { ylab = paste( ifelse(total, "Total concentration", "Concentration"), "[\u03bcg/L]") } if (add) { -- cgit v1.2.1