Calculates summary statistics for water quality data using log-normal maximum-likelihood models.
summarise_wqdata(
x,
by = NULL,
censored = FALSE,
na.rm = FALSE,
conf_level = 0.95,
quan_range = 0.5
)
The data.frame to summarise.
A character vector specifying the columns in x to independently summarise by.
A flag specifying whether to account for non-detects.
A flag specifying whether to exclude missing Value values when summarising.
A number between 0 and 1 specifying confidence limits. By default calculates 95% confidence intervals.
A number between 0 and 1 specifying the quantile range. By default calculates the inter-quartile range.
A tibble of the summary statistics.
The data set must include a numeric 'Value' and a character or factor 'Variable' column.
By default the summary statistics are independently calculated for each Variable. The user can specify additional columns to independently calculate the statistics by using the by argument.
If the user wishes to account for non-detects using left-censored maximum-likelihood (by setting censored = TRUE) the data set must also include a numeric DetectionLimit column.
Missing values in the DetectionLimit column are assumed to indicate that the Values are not censored. Missing values in the Value column are always considered to be missing values. If the user wishes to exclude missing values in the Value column they should set na.rm = TRUE.
data.frame(Variable = "var", Value = 1:5, stringsAsFactors = FALSE)
#> Variable Value
#> 1 var 1
#> 2 var 2
#> 3 var 3
#> 4 var 4
#> 5 var 5