R/appendToCSV.R

Defines functions appendToCSV

appendToCSV <- function(existing.csv, row.frame, append = TRUE, sep=",", row.names=FALSE, col.names=FALSE) {
  if (is.null(existing.csv) || file.exists(existing.csv) == FALSE) {
    warning("The file was not found or path was wrong, \"file.name=" + existing.csv+ "\"")
    return(FALSE)
  }
  row.names(row.frame) <- NULL
  write.table(row.frame, 
              file = existing.csv,
              append=append,
              sep=sep, row.names=FALSE, 
              col.names = FALSE)
  return(TRUE)
}

Try the transcribeR package in your browser

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

transcribeR documentation built on May 2, 2019, 5:09 a.m.