R/platereturn.R

platereturn <- function (AP) {
  atlas_sub <-
    atlasIndex[atlasIndex$plane == "coronal", "mm_from_bregma"]
  ind <- sapply(AP, function(x)
    which.min(abs(x - atlas_sub)))
  return(ind)
}
matiasandina/nobrainr documentation built on Dec. 21, 2021, 2:53 p.m.