Learn R Programming

RiverLoad (version 1.0.3)

monthly.mean: Monthly mean of flow records not differentiated by year

Description

The function returns the monthly arithmetic mean of continuous flow records.The mean is not differentiated by year,therefore if more year of flow records are reported, the mean refers to all flow records of the same month in the different years. It is also possible to obtain the standard deviation.

Usage

monthly.mean(flow.data, standev)

Arguments

flow.data

A dataframe with a first column with DateTime information in standard format(yyyy-mm-dd HH:MM:SS) labeled "datetime" and a second column with continuous flow records labelede "flow".

standev

An optional argument. If the user specifies "sd", the function will return the standard deviation for each row

Value

A data.frame with a first column with the months (labeled "month") and a second column with monthly mean flow (labeled "flow"). If the user has specified "sd", there is a third column with standard deviation value for each row (labeles "sd").

See Also

daily.mean monthly.year.mean annual.mean

Examples

Run this code
# NOT RUN {
data("flow.data2")
mon<-monthly.mean(flow.data2)
mon.sd<-monthly.mean(flow.data2, "sd")
# }

Run the code above in your browser using DataLab