R/temperature.R

Defines functions temperature

Documented in temperature

temperature <-
function(ndays, thiswth) {

    A <- thiswth$temperature$A
    B <- thiswth$temperature$B
    C <- thiswth$temperature$C

    # simulate daily temperature
    sapply(seq_len(ndays), function(i){A+B*sin(2*pi/365*(i+365*3/4-C))})
}

Try the VFS package in your browser

Any scripts or data that you put into this service are public.

VFS documentation built on May 2, 2019, 8:58 a.m.