
Get the files of LDbase projects, datasets, code and documents
Source:R/archive-ldbase.R
ldbase_info.RdLists the files of each LDbase link: for a project, every dataset, code and document in its hierarchy (child projects included); for a single dataset, code or document, its own file. A DOI is first resolved to the page it leads to. LDbase has no API, so this reads the public pages (one request per project or item). Items stored elsewhere (LDbase's "external link" option) have no file here and are not listed.
Arguments
- ldbase_url
a vector of LDbase URLs or DOIs, or a table containing them (e.g. from
ldbase_links())- id_col
the index or name of the column that contains the URLs, if
ldbase_urlis a table- pb
a progress bar from
pb(), or NULL to create one- cache
if
TRUE, a listing is read from / written to the persistent repository-listing cache (seerepo_info_cache_clear())
Value
a data frame with one row per link: ldbase_url, ldbase_page
(the resolved page), ldbase_type, title, doi, license (the
licence of the item, or every distinct licence of a project's items
joined by "; "), a list-column files (a data frame per link with
file_name, file_path, file_url, item_type, item_url) and
error (NA, or why the link could not be listed)
Examples
# \donttest{
if (online("ldbase.org")) {
ldbase_info("https://ldbase.org/datasets/ef328591-e249-4803-b673-76f237717d1d")
}
#> Warning: ldbase.org's firewall answered with a browser check (AWS WAF challenge) instead of the file, usually after many requests in a short time. Its files cannot be sized or downloaded until it lifts; try again later.
#> ldbase_url ldbase_page
#> 1 https://ldbase.org/datasets/ef328591-e249-4803-b673-76f237717d1d <NA>
#> ldbase_type title doi license
#> 1 datasets <NA> <NA> <NA>
#> error files
#> 1 firewall browser check (AWS WAF challenge); try again later NULL
# }