R/getDirsContainingFid.R

Defines functions getDirsContainingFid

Documented in getDirsContainingFid

getDirsContainingFid <- function(path) {
  subdirs <- dir(path, full.names = TRUE)
  if (length(subdirs) > 0) {
    cond <- sapply(subdirs, function(x)  {
      content <- dir(x)
      # subdirs must contain fid, acqu and acqus files
      return("fid" %in% content && "acqu" %in% content && "acqus" %in% content)
    })
    subdirs <- subdirs[cond]
  }
  return(subdirs)
}

Try the PepsNMR package in your browser

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

PepsNMR documentation built on Jan. 16, 2021, 2:07 a.m.