A simple wrapper for the read::read_fwf function vignette("locales")
1 2 3 |
reading only the necessary columns is much faster than reading the wihole file. This is especially true for dem-file with over 200 columns but also for STD file wich 50 colums
Providing column types gives a significant performance boost.
There are different ways to select columns. read_fwf is not very well documented. If start and end is better than withds and the two hav no performance difference anyway, internally the columns are read with begin and end indices anyway: fwf_widths(c(3,5,7))
Providing column names makes it more flexible to selct columns and has no performance impact
performance tests revealed nor calling any function in read is faster especially locale() is slow
Weardly that was nut true for calling cat(), printing each filename to the console bade the reading a bit faster
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.