I noticed a weird behaviour when calling Sys.glob in extractCHIRPS. First of all, if I'm correct the package is used in a logical order: getCHIRPS to fetch data remotely as tif > compress it (.gz format) > save it locally, following this extractCHIRPS is called to uncompress it for use in R as needed.
In my case I saved the the data locally directly from the external database, not using getCHIRPS. To uncompress it I did:
gzip -d -k chirps-v2.0.1981.01.01.tif.gz
The file is subsequently named 'chirps-v2.0.1981.01.01.tif'.
Following this I call all my newly extracted files via a wild-card using Sys.glob, like here:
tfs loads fine, however my 'chirps-v2.0.1981.01.01.tif' is now renamed as 'chirps-v2.0.1981.01.01.' on my local database, calling it again results 'chirps-v2.0.1981.01.' and again 'chirps-v2.0.1981.' and so forth... I THINK it could be possible to change the permissions temporarily to prevent renaming, that seems like overkill. It could be a Sys.glob issue. I quickly searched through Google but didn't see anything that was explicitly similar.
I noticed a weird behaviour when calling Sys.glob in extractCHIRPS. First of all, if I'm correct the package is used in a logical order: getCHIRPS to fetch data remotely as tif > compress it (.gz format) > save it locally, following this extractCHIRPS is called to uncompress it for use in R as needed.
In my case I saved the the data locally directly from the external database, not using getCHIRPS. To uncompress it I did:
gzip -d -k chirps-v2.0.1981.01.01.tif.gz
The file is subsequently named 'chirps-v2.0.1981.01.01.tif'. Following this I call all my newly extracted files via a wild-card using Sys.glob, like here:
tfs <- extractCHIRPS(Sys.glob("./extracted/chirps*"), skip = TRUE)
tfs loads fine, however my 'chirps-v2.0.1981.01.01.tif' is now renamed as 'chirps-v2.0.1981.01.01.' on my local database, calling it again results 'chirps-v2.0.1981.01.' and again 'chirps-v2.0.1981.' and so forth... I THINK it could be possible to change the permissions temporarily to prevent renaming, that seems like overkill. It could be a Sys.glob issue. I quickly searched through Google but didn't see anything that was explicitly similar.
OS: Debian Testing R version 3.4.3