R/03-dataset_functions.R
is_dossier.Rd
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.
is_dossier(object)
A potential dossier to be evaluated.
A logical.
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.
{
# 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)
}
#> [1] FALSE