cas_read_db_download | R Documentation |
Read index from local database
cas_read_db_download(
index = FALSE,
id = NULL,
batch = "latest",
status = 200L,
db_connection = NULL,
db_folder = NULL,
...
)
batch |
Default to "latest": returns only the path to the file with the highest batch identifier available. Valid values are: "latest", "all", or a numeric identifier corresponding to desired batch. |
status |
Defaults to 200. Keeps only files downloaded with the given status (can be more than one, given as a vector). If NULL, no filter based on status is applied. |
db_connection |
Defaults to NULL. If NULL, uses local SQLite database. If given, must be a connection object or a list with relevant connection settings (see example). |
... |
Passed to |
A data frame with three columns and data stored in the index_id
table of the local database. The data frame has zero rows if the database
does not exist or no data was previously stored there.
cas_set_options(
base_folder = fs::path(tempdir(), "R", "castarter_data"),
db_folder = fs::path(tempdir(), "R", "castarter_data"),
project = "example_project",
website = "example_website"
)
cas_enable_db()
urls_df <- cas_build_urls(
url = "https://www.example.com/news/",
start_page = 1,
end_page = 10
)
cas_write_db_index(urls = urls_df)
cas_read_db_index()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.