R/scan_history.R

scan_history <- function(complete_history, xp, fp, dx) {
  mp <- nrow(xp)
  np <- ncol(xp)
  imold <- matrix(0, 1, np)
  oldpoints <- c()
  oldvalues <- c()
  oldflags  <- c()
  for (i in 1:np) {
    tmp <- scal_complete_history(complete_history, xp[, i])
    fpt <- tmp$fhist
    ift <- tmp$iflaghist
    if (ift > -1) {
      oldpoints <- cbind(oldpoints, xp[, i])
      oldvalues <- cbind(oldvalues, fpt)
      oldflags  <- cbind(oldflags, ift)
      imold[i]  <- 1
    }
  }
  oldindex <- as.numeric(imold == 1)
  list(oldindex = oldindex, oldpoints = oldpoints, oldvalues = oldvalues,
	oldflags = oldflags)
}

Try the rImfil package in your browser

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

rImfil documentation built on May 2, 2019, 4:46 p.m.