Learn R Programming

crunch (version 1.25.0)

datasets: Get the dataset catalog

Description

Crunch datasets are associated with catalogs. A project catalog will have a set of datasets associated with it, as will a user or team. This function allows you to get or modify the datasets associated with a catalog.

Usage

datasets(x = getAPIRoot())

datasets(x) <- value

Arguments

x

a ShojiObject, such as a ProjectFolder. If omitted, the function 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
# }

Run the code above in your browser using DataLab