Skip to content

Instantly share code, notes, and snippets.

@Thell
Created January 8, 2014 21:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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