R/doubleDiff.R

Defines functions doubleDiff

doubleDiff <- function(dd, file="doubleDiff.txt") {
   psi <- dd@psi.df
   psi[2:dd@nt,] <- psi[2:dd@nt,] - psi[1:(dd@nt-1),]
   dd@psi.df <- psi[-1,]
   dd@x <- dd@x[-1]
   dd@nt <- length(dd@x)
   write.table(t(dd@psi.df), file=file,
               quote=FALSE, row.names=dd@x2,
               col.names=dd@x)
   dd
}

Try the TIMP package in your browser

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

TIMP documentation built on May 2, 2019, 5:55 p.m.