R/simocc.R

simocc <-
function(start, end, length){
    sn <- as.numeric(start)
    en <- as.numeric(seq(end,by=paste("-",length, sep=""), len=2)[2]-1)
    deb <- as.POSIXct(runif(1, sn, en), origin="1970-01-01")
    fin <- seq(deb, by=length, len=2)[2]
    return(c(start=deb, end=fin))
}

Try the CMRCT package in your browser

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

CMRCT documentation built on May 2, 2019, 6:44 p.m.