Skip to contents

clear_cache_muni() removes CNEFE ZIP files stored in the user cache directory by cnefe_counts(), compute_lumi(), tracts_to_h3(), and related functions.

Usage

clear_cache_muni(code_muni = "all", verbose = TRUE)

Arguments

code_muni

Integer or "all". If "all" (default), all cached CNEFE ZIP files are deleted. If a seven-digit IBGE municipality code is provided, only the ZIP file for that municipality is deleted.

verbose

Logical; if TRUE (default), reports the number of files deleted and the space freed.

Value

Invisibly, the character vector of deleted file paths.

Examples

# \donttest{
# Delete all cached CNEFE ZIPs
clear_cache_muni()
#>  Cache directory does not exist: /home/runner/.cache/R/cnefetools

# Delete only the ZIP for Lauro de Freitas-BA
clear_cache_muni(2919207)
#>  Cache directory does not exist: /home/runner/.cache/R/cnefetools
# }