Skip to contents

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,
  ...
)

Arguments

id

Defaults to NULL. A vector of id. Rows with the given id will be added to the ignore table.

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/RtmpKZFKM9/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    29
#>  2     5
#>  3    91
#>  4    97
#>  5    50
#>  6    20
#>  7    93
#>  8    45
#>  9    88
#> 10     1