RIDL Dataset
RIDL Dataset
Details
RIDLDataset class containing all logic for accessing,
creating, and updating datasets and associated resources.
Public fields
resources
list of Resource object within the dataset
data
placeholder for Dataset field element
Methods
Inherited methods
Create a new Dataset object
Usage
RIDLDataset$new(initial_data = NULL, configuration = NULL)
Arguments
initial_data
list with required field to create a dataset
configuration
a Configuration object
Method ridl_resource_get()
Get the nth resource of the dataset
Usage
RIDLDataset$ridl_resource_get(n)
Arguments
n
integer, the index of the resource to access
Returns
a Resource object, the selected resource
Method ridl_resource_get_all()
Get all resources of the dataset
Usage
RIDLDataset$ridl_resource_get_all(pattern = NULL, format = NULL)
Arguments
pattern
character, regex pattern in resource name
format
character, format of the resources
Returns
a list of Resource objects, all resources available in the dataset
Method ridl_resource_count()
Get number of dataset resources
Usage
RIDLDataset$ridl_resource_count()
Returns
The number of RIDLResource objects
Method ridl_resource_delete()
Delete a resource by its index
Usage
RIDLDataset$ridl_resource_delete(index = 1L)
Arguments
index,
the index of the resource to delete
Method ridl_resource_delete_all()
Delete all resources from a dataset
Usage
RIDLDataset$ridl_resource_delete_all()
Method ridl_resource_add()
Add a resource to a dataset
Usage
RIDLDataset$ridl_resource_add(resource, ignore_dataset_id = FALSE)
Arguments
resource
RIDLResource, the resource
ignore_dataset_id
logical, ignore the dataset id
Method ridl_delete()
Delete a dataset
Usage
RIDLDataset$ridl_delete(id, configuration = NULL)
Arguments
id
character, the id or name of the dataset to delete
configuration
RIDLConfig, the configuration
Method ridl_container_set()
Add a container to a dataset
Usage
RIDLDataset$ridl_container_set(container_name)
Arguments
container_name
the name of the container to add
Browse the dataset page on RIDL
Usage
RIDLDataset$ridl_browse()
Get the current configuration in use
Usage
RIDLDataset$ridl_config_get()
Returns
A configuration object, the configuration in use
Method get_date_range()
Get the dataset date
Usage
RIDLDataset$get_date_range()
Returns
a date, the dataset date.
Method ridl_container_get()
Get the dataset container name
Usage
RIDLDataset$ridl_container_get()
Returns
a RIDLContainer, the container where the dataset is shared
Method ridl_container_get_title()
Get the dataset container title
Get the title of the dataset for pretty printing
Usage
RIDLDataset$ridl_container_get_title()
Returns
a character, the title
Method collaborator_list()
Get all collaborators for a given dataset
Usage
RIDLDataset$collaborator_list(
user = NULL,
capacity = "member",
configuration = NULL
)
Arguments
user
character, id or name of the user
capacity
character, the user capacity
configuration
RIDLConfig, the configuration
Returns
a character, the title
Method get_fields()
Get dataset fields
Returns
list of fields for a dataset
Method get_required_fields()
Get dataset required fields
Usage
RIDLDataset$get_required_fields()
Returns
list of required fields for a dataset
Method check_required_fields()
Check dataset required field
Usage
RIDLDataset$check_required_fields()
Returns
a logical value, TRUE if the the dataset
is not missing a required field and throws an error otherwise
Method as_list()
Get dataset field into list
Returns
a list with dataset field
Method clone()
The objects of this class are cloneable with this method.
Usage
RIDLDataset$clone(deep = FALSE)
Arguments
deep
Whether to make a deep clone.