is_dossier: Test if an object is a valid dossier (list of dataset(s))

is_dossierR Documentation

Test if an object is a valid dossier (list of dataset(s))

Description

Tests if the input object is a valid dossier. This function mainly helps validate input within other functions of the package but could be used to check if a dossier is valid.

Usage

is_dossier(object)

Arguments

object

A potential dossier to be evaluated.

Details

A dossier is a named list containing at least one data frame or more, each of them being datasets. The name of each tibble will be use as the reference name of the dataset.

Value

A logical.

Examples

{

# use madshapR_DEMO provided by the package
# Any list of data frame can be a dossier by definition.
library(stringr)

is_dossier(madshapR_DEMO[str_detect(names(madshapR_DEMO),"dataset")])
is_dossier(list(dataset_1 = iris, dataset_2 = mtcars))
is_dossier(iris)

}


madshapR documentation built on May 29, 2024, 7:43 a.m.