
Last chance! 50% off unlimited learning
Sale ends in
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.
datasets(x = getAPIRoot())datasets(x) <- value
a ShojiObject
, such as a CrunchProject
. If omitted,
the function will load the user's primary dataset catalog. #'
CrunchDataset
for the setter
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
).
# 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