statByStation: Calculate summary statistic by station

View source: R/misc_funs.r

statByStationR Documentation

Calculate summary statistic by station

Description

Calculate summary statistic by station

Usage

statByStation(
  dfm,
  stat = "mean",
  station = "loc_code",
  vbl = "result",
  cens = NULL
)

Arguments

dfm

data frame containing the data

stat

statistical function to calculate. Mean is the default.

station

station field name, supplied as a string

vbl

field name numeric variable to summarize, supplied as a string

cens

optional field name indicating whether the analyte was detected ('=') or not ('<')

Value

a data frame with summary statistic by station


PDXChris/pmMaps documentation built on Sept. 22, 2024, 9:02 p.m.