clear_cache_muni() removes CNEFE data files stored in the user cache
directory by cnefe_counts(), compute_lumi(), tracts_to_h3(), and
related functions.
The cache holds gzipped CSVs (.csv.gz). Archives left by versions before
0.3.0, which cached the ZIP as published by IBGE, are removed as well.
Arguments
- code_muni
Integer or
"all". If"all"(default), every cached CNEFE file is deleted. If a seven-digit IBGE municipality code is provided, only the file for that municipality is deleted.- verbose
Logical; if
TRUE(default), reports the number of files deleted and the space freed.- cache_dir
Character. Directory to use for cached downloads. If
NULL(default), theCNEFETOOLS_CACHE_DIRenvironment variable is used when it is set, otherwisetools::R_user_dir()withwhich = "cache". Use this to point large downloads at a secondary drive or a shared volume.- year
Integer. Restrict the deletion to one CNEFE edition.
NULL(default) clears every edition, which is the previous behaviour.