Updates a dataset given a previously created parameters export file.

UpdateDataset(dataset = NULL, links = NULL,
  maxNumberOfIndexPages = 1000, wait = 1, exportRds = TRUE,
  project = NULL, website = NULL)

Arguments

dataset

A 'castarter' dataset, defaults to NULL. If not given, and project and website are given (possily, through `SetCastarter(project = ..., website =)`), the latest dataset is automatically loaded.

links

A chacter vector, defaults to NULL. If given, it is checked against the given dataset: new links are downloaded, the correspondent pages extracted, and the result added to the dataset. If not given, the function downloads index pages along the criteria found in the stores param file and continues downloading them as long as there is at least a new link in an index page. Based on this, it then proceeds to update the dataset.

maxNumberOfIndexPages

An integer, defaults to 1000 to prevent function from running indefinitely (however, this can be set to `Inf`). Maximum number of index pages to be downloaded before the function proceeds with updating the dataset.

wait

Defaults to 1. Number of seconds to wait between downloading one page and the next. Can be increased to reduce server load, or can be set to 0 when this is not an issue.

exportRds

Logical, defaults to TRUE. If TRUE, it stores the updated dataset in the Dataset folder in .rds format.

project

Name of 'castarter' project. Must correspond to the name of a folder in the current working directory. Defaults to NULL, required for importing parameters. This can be left blank if previously set with SetCastarter(project = "project", website = "website").

website

Name of a website included in a 'castarter' project. Must correspond to the name of a sub-folder of the project folder. Defaults to NULL, required for importing parameters. This can be left blank if previously set with SetCastarter(project = "project", website = "website").

Value

A castarter dataset.

Examples

# NOT RUN {
dataset <- UpdateDataset()
# }