user_data encapsulates the data and metadata associated with a trial.
Fields
- name
charactername of the user_data object, by default "user_data".- excel_data_trial
characterpath to the current Excel file used for import/export operations.- obs_data
A named
listof data.frames, each corresponding to a sheet or file containing observation data- metadata
A
liststoring metadata tables, such as "placette", "modalite"- plot_tnt_association
A
liststoring association tables between plot and TNT- prepared_data
A
liststoring prepared_data tables ready for stats analysis as produced by the function prepare_data()- stats
A
liststoring stats results as results of the function stats_tests()- traceability
A
data.framestoring a log of all operations performed on the data (import, export, update, etc.).- dictionary
A
data.framestoring the data dictionary- meteo
A
data.framestoring the meteo data
Methods
- initialize()
Initializes a new
user_dataobject- add_metadata()
Adds or updates a metadata element to the
user_dataobject- add_obs()
Adds or updates a data element to the
user_dataobject- show_obs_data()
Displays the first few rows of each observation dataset stored in the
user_dataobject- log_trace()
Adds a new entry to the
traceabilitylog stored in theuser_dataobject
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.).
dictionaryA data.frame storing the data dictionary.
meteoA data.frame storing the meteo data
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 description of the data operation, the input and output files or sheet name(s), and the timestamp.
