Skip to content

Instantly share code, notes, and snippets.

@Thell
Created January 8, 2014 21:14
Show Gist options
  • Save Thell/8324791 to your computer and use it in GitHub Desktop.
Save Thell/8324791 to your computer and use it in GitHub Desktop.
Possible Wrapper to skip the last n lines of R read.csv
myread.csv <- function( file, header=TRUE, sep=",", quote="\"", dec=".", fill=TRUE, comment.char="", skip.footer=0, ... ) {
file <- readLines(file)
if( skip.footer > 0 ) file <- file[-(skip.footer)]
read.csv( file, header, sep, quote, dec, fill, comment.char, ... )
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment