R/gatherFigures.R

Defines functions gatherFigures clearFigures

gatherFigures <- function() {
  bp <- "~/Github/miR34a_asRNA_project/inst"
  pdfs <- fileMap(type = "pdf")
  cmds <- lapply(1:length(pdfs), function(x)
    paste(
      "cp",
      file.path(bp, pdfs[[x]]),
      file.path(bp, "allFigures", substr(names(pdfs)[[x]], 1, nchar(names(pdfs)[[x]])-1)),
      sep = " "
    )
  )
  lapply(cmds, system)
}

clearFigures <- function() {
  bp <- "~/Github/miR34a_asRNA_project/inst/allFigures"
  cmds <- list(
    paste("rm -r ", file.path(bp, "figure1/*.*"), sep = ""),
    paste("rm -r ", file.path(bp, "figure2/*.*"), sep = ""),
    paste("rm -r ", file.path(bp, "figure3/*.*"), sep = ""),
    paste("rm -r ", file.path(bp, "suppFigure1/*.*"), sep = ""),
    paste("rm -r ", file.path(bp, "suppFigure2/*.*"), sep = "")
  )
  lapply(cmds, system)
}
GranderLab/miR34a_asRNA_project documentation built on May 26, 2019, 7:26 a.m.