R/trend.R

Defines functions trend.seepr_fit trend.seepr_dhr trend

Documented in trend

#' @title trend
#' @description Extract the trend component from a seepr_dhr regression
#' result.
#'
#' @param x A seepr_dhr regression result.
#'
#' @export

trend <- function(x){
  UseMethod("trend")
}

#' @exportS3Method
trend.seepr_dhr <- function(x){
  trend_out <- x$m[,1]
  trend_out[-1]
}

#' @exportS3Method
trend.seepr_fit <- function(x){
  attr(x, "TREND")
}
valentingar/seepr documentation built on March 24, 2022, 10:04 p.m.