View source: R/dataset_download.R
dataset_download | R Documentation |
A wrapper around dataset
and
an import function.
dataset_download(
Title,
Dimensions = NULL,
Measures = NULL,
Attributes = NULL,
Identifier = NULL,
url,
type = "csv",
...
)
dataset_download_csv(
url,
Title,
Dimensions = NULL,
Measures = NULL,
Attributes = NULL,
Identifier = NULL,
type = "csv",
destfile = NULL,
method = "auto",
quiet = TRUE,
mode = "wb",
cacheOK = TRUE
)
Title |
dct:title, a name given to the resource.
|
Dimensions |
The name or column number of the dimensions within the dataset. |
Measures |
The name or column number of the measures within the dataset. |
Attributes |
The name or column number of the attributes within the dataset. |
Identifier |
An unambiguous reference to the resource within a given context.
Recommended practice is to identify the resource by means of a string conforming to an
identification system. Examples include International Standard Book Number (ISBN),
Digital Object Identifier (DOI), and Uniform Resource Name (URN).
Select and identifier scheme from
registered URI schemes maintained by IANA.
More details: Guidelines for using resource identifiers in Dublin Core metadata and IEEE LOM.
Similar to |
url |
a |
type |
A file type. Currently only |
... |
allow additional arguments to be passed, unused. |
destfile |
a character string (or vector, see the |
method |
Method to be used for downloading files. Current
download methods are The method can also be set through the option
|
quiet |
If |
mode |
character. The mode with which to write the file. Useful
values are |
cacheOK |
logical. Is a server-side cached value acceptable? |
A dataset
with the downloaded dataset.
dest_file <- file.path(tempdir(), "iris.csv")
dataset_download(
url = "https://zenodo.org/record/7421899/files/iris.csv?download=1",
Dimensions = NULL,
Measures = c("Sepal.Length", "Sepal.Width", "Petal.Length", "Petal.Width" ),
Attributes = "Species",
Title = "Iris Dataset",
Publisher = "American Iris Society",
Identifier = "https://doi.org/10.1111/j.1469-1809.1936.tb02137.x",
destfile = dest_file
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.