parse_file_size_mb.RdParses file size strings containing KB, MB, or GB units and converts them to a numeric value in megabytes.
parse_file_size_mb(file_size, rounding = 5)A numeric vector of file sizes in megabytes.
parse_file_size_mb("531 KB")
#> [1] 0.51855
parse_file_size_mb("1.8 MB")
#> [1] 1.8
parse_file_size_mb(c("90 KB", "2 MB", "1 GB"))
#> [1] 8.789e-02 2.000e+00 1.024e+03