Ignore a set of ids from the download or processing step
Source:R/cas_ignore_id.R
cas_write_db_ignore_id.Rd
There are two main use cases for this function:
a number of the files downloaded turned out to be irrelevant. Rather than delete any trace about them, it may be preferrable to just ignore them, so they are not processed when extracting data.
urls originally included for download, but not yet downloaded, should be ignored and not downloaded. This may or may not be a temporary arrangement, but it is considered useful to keep the urls in the database.
Usage
cas_write_db_ignore_id(
id,
db_folder = NULL,
db_connection = NULL,
disconnect_db = FALSE,
...
)
cas_ignore_id(
id,
db_folder = NULL,
db_connection = NULL,
disconnect_db = FALSE,
...
)
Examples
cas_set_options(
base_folder = fs::path(tempdir(), "R", "cas_write_db_ignore_id"),
db_folder = fs::path(tempdir(), "R", "cas_write_db_ignore_id"),
project = "example_project",
website = "example_website"
)
cas_enable_db()
cas_write_db_ignore_id(id = sample(x = 1:100, size = 10))
#> ℹ Folder /tmp/Rtmp1QODEK/R/cas_write_db_ignore_id for storing project and
#> website files created.
#> ✔ 10 identifiers added to ignore table.
cas_read_db_ignore_id()
#> # A tibble: 10 × 1
#> id
#> <dbl>
#> 1 33
#> 2 77
#> 3 82
#> 4 32
#> 5 69
#> 6 55
#> 7 11
#> 8 100
#> 9 36
#> 10 7