- type
Character. Type of data to download. Default: "medicines".
Use anvisa_types() to see all 14 available types.
Snapshot types (no year/month needed):
"medicines", "medical_devices", "food",
"cosmetics", "sanitizers", "tobacco",
"pesticides", "hemovigilance", "technovigilance",
"vigimed_notifications", "vigimed_medicines",
"vigimed_reactions".
Time-series types (year required):
"sngpc", "sngpc_compounded".
- year
Integer. Year(s) of the data. Only used for SNGPC types
(2014-2026). Ignored with a warning for snapshot types.
- month
Integer. Month(s) 1-12. Only used for SNGPC types.
If NULL (default), downloads all 12 months. Ignored with a warning
for snapshot types.
- vars
Character vector. Variables to keep. If NULL (default),
returns all available variables. Use anvisa_variables()
to see available variables per type.
- cache
Logical. If TRUE (default), caches downloaded data for
faster future access.
- cache_dir
Character. Directory for caching. Default:
tools::R_user_dir("healthbR", "cache").
- lazy
Logical. If TRUE, returns a lazy query object instead of a
tibble. Only available for SNGPC types (partitioned cache). Requires
the arrow package. Default: FALSE.
- backend
Character. Backend for lazy evaluation: "arrow"
(default) or "duckdb". Only used when lazy = TRUE.