Skip to contents

Take the mean of each month, filter if there's not at least 15 days, and create a new date that is the midpoint of each month.

Usage

monthly_mean(x, date_col = "time", value_col = "value")

Arguments

x

data.frame

date_col

character name of date column

value_col

character name of value column

Examples


# site <- "USGS-263819081585801"
p_code_dv <- "62610"
# statCd <- "00001"
# gw_level_dv <- dataRetrieval::read_waterdata_daily(monitoring_location_id = site,
#                                                    parameter_code = p_code_dv,
#                                                    statistic_id = statCd,
#                                                    skipGeometry = TRUE)
gw_level_dv <- L2701_example_data$Daily

site_statistics <- monthly_frequency_table(gw_level_dv, 
                                           NULL,
                                           parameter_cd = p_code_dv)

gw_monthly <- monthly_mean(gw_level_dv)