RIDLResource | R Documentation |
RIDL Resource
RIDL Resource
RIDLResource, it contains all the logic for creating, checking, and updating resources
ridl::RIDLObject
-> RIDLResource
data
placeholder for Resource field element
new()
Create a new RIDLResource object
RIDLResource$new(initial_data = NULL, configuration = NULL)
initial_data
list with required field to create a resource
configuration
a RIDLConfig object
A RIDLResource object
download()
Download a RIDL resource
RIDLResource$download( folder = NULL, filename = NULL, quiet = TRUE, force = FALSE )
folder
a character, folder to save the dataset
filename
a character, filename of the dataset
quiet
a logical value, silent download if TRUE
force
a logical value, force download
a character, the file path
download_folder()
Get the download folder for the latest downloaded resource
RIDLResource$download_folder()
a character, folder with the latest downloaded resource
read()
Read a resource object directly into memory
RIDLResource$read( sheet = NULL, format = NULL, download_folder = NULL, force_download = FALSE, quiet_download = TRUE, ... )
sheet
a character value, only for resource in Excel format
format
character, specify file format in case the automatic reader doesn't work as expected
download_folder
a character value, folder to save the downloaded resource
force_download
a logical value, if TRUE force download
quiet_download
a logical value, if TRUE silent download
...
other parameters
A tibble
excel_sheets()
Get the list of sheets name of resource
RIDLResource$excel_sheets( format = NULL, download_folder = NULL, quiet_download = TRUE, force_download = FALSE )
format
character, specify file format in case the automatic reader doesn't work as expected
download_folder
a character value, folder to save the downloaded resource
quiet_download
a logical value, if TRUE silent download
force_download
a logical value, if TRUE force download
the names of the sheets of XLS(X) resources
ridl_dataset()
Get the resource dataset.
RIDLResource$ridl_dataset()
a RIDLDataset, the dataset containing the resource
file_format()
Get the file format
RIDLResource$file_format()
a character, the file format of the resource
check_required_field()
Check dataset required field
RIDLResource$check_required_field(check_dataset_id = FALSE)
check_dataset_id
logical whether to check or not dataset id
a logical value, TRUE if the the resource is not missing a required field and throws an error otherwise
get_file_to_upload()
Get the file that will be or has been uploaded if any
RIDLResource$get_file_to_upload()
the file to upload
set_file_to_upload()
Set the file that will be uploaded
RIDLResource$set_file_to_upload(file_to_upload)
file_to_upload
character the path to the file to upload
check_resource_type()
Check if the resource has an url or a file to upload but not both
RIDLResource$check_resource_type()
a logical value, TRUE if the the resource don't mix 'url' and and 'file_to_upload'
get_fields()
Get resource fields
RIDLResource$get_fields()
list of fields for a resource
get_required_fields()
Get resource required fields
RIDLResource$get_required_fields()
list of required fields for a resource
check_required_fields()
Check resource required field
RIDLResource$check_required_fields()
a logical value, TRUE if the the resource is not missing a required field and throws an error otherwise
as_list()
Get resource field into list
RIDLResource$as_list()
a list with resource field
ridl_browse()
Browse the resource page on RIDL
RIDLResource$ridl_browse()
print()
Print a Resource object
RIDLResource$print()
clone()
The objects of this class are cloneable with this method.
RIDLResource$clone(deep = FALSE)
deep
Whether to make a deep clone.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.