View source: R/06-data_evaluate.R
dataset_evaluate | R Documentation |
Assesses the content and structure of a dataset object and generates reports of the results. This function can be used to evaluate data structure, presence of specific fields, coherence across elements, and data dictionary formats.
dataset_evaluate(
dataset,
data_dict = NULL,
valueType_guess = FALSE,
as_data_dict_mlstr = TRUE,
taxonomy = NULL,
dataset_name = .dataset_name,
.dataset_name = NULL
)
dataset |
A dataset object. |
data_dict |
A list of data frame(s) representing metadata of the input dataset. Automatically generated if not provided. |
valueType_guess |
Whether the output should include a more accurate valueType that could be applied to the dataset. FALSE by default. |
as_data_dict_mlstr |
Whether the input data dictionary should be coerced with specific format restrictions for compatibility with other Maelstrom Research software. TRUE by default. |
taxonomy |
An optional data frame identifying a variable classification schema. |
dataset_name |
A character string specifying the name of the dataset
(used internally in the function |
.dataset_name |
A data dictionary contains the list of variables in a dataset and metadata
about the variables and can be associated with a dataset. A data dictionary
object is a list of data frame(s) named 'Variables' (required) and
'Categories' (if any). To be usable in any function, the data frame
'Variables' must contain at least the name
column, with all unique and
non-missing entries, and the data frame 'Categories' must contain at least
the variable
and name
columns, with unique combination of
variable
and name
. The function truncates each cell to a maximum of
10000 characters, to be readable and compatible with Excel.
A dataset is a data table containing variables. A dataset object is a data frame and can be associated with a data dictionary. If no data dictionary is provided with a dataset, a minimum workable data dictionary will be generated as needed within relevant functions. Identifier variable(s) for indexing can be specified by the user. The id values must be non-missing and will be used in functions that require it. If no identifier variable is specified, indexing is handled automatically by the function.
A taxonomy is a classification schema that can be defined for variable
attributes. A taxonomy is usually extracted from an
Opal environment, and a
taxonomy object is a data frame that must contain at least the columns
taxonomy
, vocabulary
, and terms
. Additional details about Opal
taxonomies are
available online.
The object may be specifically formatted to be compatible with additional Maelstrom Research software, in particular Opal environments.
A list of data frames containing assessment reports.
dossier_evaluate()
{
# use madshapR_DEMO provided by the package
library(dplyr)
###### Example : Any data frame can be summarized
dataset <- as_dataset(
madshapR_DEMO$`dataset_TOKYO - errors with data`,
col_id = 'part_id') %>% slice(0)
glimpse(dataset_evaluate(dataset,as_data_dict_mlstr = FALSE))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.