loadDataset {crunch} | R Documentation |
Load a Crunch Dataset
Description
This function gives you a Dataset object, which refers to a dataset hosted on the Crunch platform. With this Dataset, you can perform lots of data cleaning and analysis as if the dataset were fully resident on your computer, without having to pull data locally.
Usage
loadDataset(
dataset,
kind = c("active", "all", "archived"),
project = NULL,
refresh = FALSE
)
Arguments
dataset |
character, the name or path to a Crunch dataset to load, or a
dataset URL. If |
kind |
character specifying whether to look in active, archived, or all datasets. Default is "active", i.e. non-archived. |
project |
|
refresh |
logical: should the function check the Crunch API for new
datasets? Default is |
Details
You can specify a dataset to load by its human-friendly "name", possibly also
by indicating a project (folder) to find it in. This makes code more
readable, but it does mean that if the dataset is renamed or moved to a
different folder, your code may no longer work. The fastest, most reliable
way to use loadDataset()
is to provide a URL to the dataset–the dataset's
URL will never change.
Value
An object of class CrunchDataset
.
See Also
See cd()
for details of parsing and walking dataset folder/project
paths.
Examples
## Not run:
ds <- loadDatasets("A special dataset")
ds2 <- loadDatasets("~/My dataset")
ds3 <- loadDataset("My dataset", project = "~") # Same as ds2
ds4 <- loadDataset("https://app.crunch.io/api/datasets/bd3ad2/")
## End(Not run)