R/bm_plot.R

Defines functions bm_trend bm_plot

#' @export
bm_plot <- function(X){

  print(rasterVis::levelplot(X))

}

#' @export
bm_trend <- function(Z){

time <- 1:nlayers(Z)
fun=function(x) { if (is.na(x[1])){ NA } else { m = lm(x ~ time); summary(m)$coefficients[2] }}
gimms.slope=calc(Z, fun)

print(plot(gimms.slope))
return(gimms.slope)

}
giacfalk/blackmaRble documentation built on Jan. 30, 2024, 6:58 p.m.