# example data with errors
f <- system.file("extdata/ebd-sample_messy.txt", package = "auk")
tmp <- tempfile()
# clean file to remove problem rows
auk_clean(f, tmp)
# number of lines in input
length(readLines(f))
# number of lines in output
length(readLines(tmp))
# note that the extra blank column has also been removed
ncol(read.delim(f, nrows = 5, quote = ""))
ncol(read.delim(tmp, nrows = 5, quote = ""))
unlink(tmp)
Run the code above in your browser using DataLab