Skip to content

Commit

Permalink
adjust some messages
Browse files Browse the repository at this point in the history
  • Loading branch information
boshek committed Jun 24, 2023
1 parent f1f2e36 commit b0cf684
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/realtime_plot.R
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ plot.realtime <- function(x = NULL, Parameter = c("Flow", "Level"), ...) {
Parameter <- match.arg(Parameter)

if (length(unique(x$STATION_NUMBER)) > 1L) {
stop("realtime plot methods only work with objects that contain one station", call. = FALSE)
stop("realtime plots only work with objects that contain one station", call. = FALSE)
}

if (is.null(x)) stop("Station(s) not present in the datamart")
if (is.null(x)) stop("Station not present in the datamart")

## Catch mis labelled parameter
if (Parameter == "Level" && ((nrow(x[x$Parameter == "Level", ]) == 0) | all(is.na(x[x$Parameter == "Level", ]$Value)))) {
Expand Down

0 comments on commit b0cf684

Please sign in to comment.