R/ts_cut.R

Defines functions ts_cut

Documented in ts_cut

#' @title ts_cut
#' @description cut first time series to the size of the second
#' @param ser1 is the series to be cut
#' @param ser2 is the series from which the boundaries for the cut are used
#' @return the truncated time series
#' @examples
#' # co2<- ts_cut(co2.ts, rss.ts)

ts_cut<-function(ser1, ser2){
  return(window(ser1, start=start(ser2), end=end(ser2)))
}
MrOoijer/myLib documentation built on Dec. 17, 2021, 4:22 a.m.