Learn R Programming

crunch (version 1.14.4)

datasets: Get the dataset catalog

Description

Get the dataset catalog

Usage

datasets(x = getAPIRoot())
datasets(x) <- value

Arguments

x
a ShojiObject, such as a CrunchProject. If omitted, the default value for x means that you will load the user's primary dataset catalog.
value
CrunchDataset for the setter

Value

An object of class DatasetCatalog. The setter returns the project (or other object that contains a dataset catalog with the given dataset added to it (via changing its owner to be the specified object, x).

Examples

Run this code
## Not run: 
# # Get the primary dataset catalog
# mydatasets <- datasets()
# # Can load a dataset from that
# ds <- loadDataset(mydatasets[["Dataset name"]])
# # Can use the same function to get the dataset catalog for a project
# proj <- projects()[["Project name"]]
# projdatasets <- datasets(proj)
# # The assignment method lets you move a dataset to a project
# datasets(proj) <- ds
# ## End(Not run)

Run the code above in your browser using DataLab