Description Usage Arguments Author(s) Examples
Assuming data has been read into the memory as a data.frame. Each row of the data.frame contains the observation in a given month at given location. Month index and station location information are saved in 5 columns of the data.frame. The name of these columns should be "lon", "lat", "elev", "year", and "month".
1 | sstl_local_dr(data, mlcontrol = spacetime.control(), outdiv)
|
data |
The input data.frame which contains observation, lon, lat, elev, and year, month |
mlcontrol |
Should be a list object generated from |
outdiv |
Specify the output division type. |
Xiaosu Tong
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | head(tmax_all)
n <- 100 # just use 1000 stations as example
set.seed(99)
first_stations <- sample(unique(tmax_all$station.id), n)
small_dt <- subset(tmax_all, station.id %in% first_stations)
small_dt$station.id <- as.character(small_dt$station.id)
small_dt$month <- as.character(small_dt$month)
mcontrol <- spacetime.control(
vari="tmax", n=576, n.p=12, stat_n=n, surf = "interpolate",
s.window=13, t.window = 241, degree=2, span=0.35, Edeg=0
)
rst <- sstl_local_dr(small_dt, mlcontrol=mcontrol, outdiv="loc")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.