This is a quick way of counting lines in a text file, to ensure the final # of rows in the loaded dataset is correct: https://stackoverflow.com/questions/23456170/get-the-number-of-lines-in-a-text-file-using-r
count_lines_textfile(file_path)
file_path | character: Path to file |
---|
Other functions for validating license data: check_dups
,
summary_churn
,
summary_initial
, summary_sale
x <- matrix(1:10, ncol = 5) f <- tempfile("test-matrix") write(x, f) readLines(f)#> [1] "1 2 3 4 5" "6 7 8 9 10"count_lines_textfile(f)#> [1] 2unlink(f)