R/mirror.data.r

Defines functions mirror.data

mirror.data <- function(DT, plane='x'){
  DT2 <- DT[get(plane)!=0]
  DT2[, c(plane):= -get(plane)]
  DT <- rbindlist(list(DT,DT2))
  setkey(DT,x,z)
  return(DT)
}
benjamtre/fieldscanr documentation built on Dec. 21, 2017, 8:02 a.m.