R/pvallister.r

Defines functions pvallister

Documented in pvallister

#nullprob wrapper - applies null prob to each of several boxes in a trajectory


pvallister <- function(checpts,x,y,trajinf){

  nboxes <- length(checpts)
  pvallist <- list()
  ofboxlist <- list()
  
  #first convert all boxes to old form:
  
  for (boxind in checpts){
    
    boxy <- list(box=trajinf$box[[boxind]],dimlist=trajinf$dimlist[[boxind]])
    ofboxlist[[boxind]] <- boxconverter(boxy)
    
  }
  
  for (i in checpts){
  
    pvallist[[i]] <- cbind(ofboxlist[[i]][[1]],nullprob(cbind(x,y),y=NULL,ofboxlist[[i]]))
  
  }
  
  return(pvallist)

}

Try the sdtoolkit package in your browser

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

sdtoolkit documentation built on May 2, 2019, 6:04 a.m.