cloudyr / googleCloudStorageR

Google Cloud Storage API to R
https://code.markedmondson.me/googleCloudStorageR
Other
104 stars 29 forks source link

added format option #157

Closed muschellij2 closed 2 years ago

muschellij2 commented 2 years ago

With proposed change, fixes #157.

head(googleCloudStorageR::gcs_list_objects()$size)
#> [1] "218.8 Mb"  "137.9 Mb"  "1.1 Kb"    "45.6 Kb"   "74 bytes"  "159 bytes"
options("googleCloudStorageR.format_unit" = "b")
head(googleCloudStorageR::gcs_list_objects()$size)
#> [1] "229391688 bytes" "144595139 bytes" "1169 bytes"      "46656 bytes"    
#> [5] "74 bytes"        "159 bytes"

Created on 2022-03-07 by the reprex package (v2.0.1)