cal_mean: Calculate the mean of the nearest N stations

Description Usage Arguments Value

View source: R/cal_mean.R

Description

Calculate the mean of the nearest N stations

Usage

1
cal_mean(id, dt, N = 5, BYcols = c("Year", "Month", "Day"), ...)

Arguments

id

The ID of the desired station

dt

A data.table of observation data. Typically, it should contain the columns including ID, Year, Month and Day.

N

A integer indicating how many stations to be used.

BYcols

A character vector of column names: e.g., DT[, sum(a), by=c("x", "y")].

...

Other arguments passed to data.table.

Value

A data.table with missing value filled for the disired station.


hxfan1227/cmdcr documentation built on Sept. 13, 2020, 12:14 a.m.