R/SS.r

Defines functions SS

Documented in SS

SS <- function(offtemp, Sx){

          totnM <- length(unique(offtemp))
          off2 <- as.data.frame(cbind(1:length(offtemp),offtemp))
          off2 <- split(off2, off2$offtemp)
          St <- list()
          for(i in 1:totnM) St[[i]] <- Reduce("+", Sx[ off2[[i]][,-2] ])
          St
          
}

Try the JRM package in your browser

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

JRM documentation built on July 13, 2017, 5:03 p.m.