This R6 class is designed to manage experimental data, including observation sheets, metadata, and traceability logs. It provides methods to import, merge, and export data from Excel files while tracking operations for reproducibility.
Public fields
namename of the user_data object, by default "user_data".
excel_data_trialPath to the current Excel file used for import/export operations.
obs_dataA named list of data.frames, each corresponding to a sheet or file containing observation data.
metadataA list storing metadata tables, such as "placette" and "modalite".
plot_tnt_associationA list storing association tables between plot and TNT.
prepared_dataA list storing prepared_data tables ready for stats analysis as produced by the function prepare_data()
statsA list storing stats results as results of the function stats_tests()
traceabilityA data.frame storing a log of all operations performed on the data (import, export, update, etc.).
Methods
Method new()
Initializes a new user_data object. If no Excel file is provided, a default template is used.
Usage
user_data$new(trial_file = NULL, name = NULL)Method add_metadata()
Adds or updates a metadata element in the metadata slot.
Method add_obs()
Adds a new observation dataset to obs_data or replaces an existing one.
Automatically logs the operation and adds provenance columns.
Method log_trace()
This function adds a new entry to the traceability log stored in the R6 object.
It records the type of operation, the target file or sheet name(s), and the timestamp.
