Passer au contenu

Exports processed dataframes from prepared_data and statistical results from stats into a single Excel workbook. The file is automatically saved to the user's "Downloads" folder with a unique timestamp to prevent overwriting.

Utilisation

export_stats_sheets(self, selected_data = NULL)

Arguments

self

An instance of the R6 class. Must contain prepared_data and/or stats lists.

selected_data

Optional character vector. Names of specific datasets or analyses to export. If NULL (default), all available data are exported.

Valeur de retour

Invisibly returns the self object. The full path to the generated Excel file is stored in self$excel_data_trial.

Détails

  • File Management: The file is named Stats_YYYY-MM-DD_HHhMM.xlsx and saved in the system's default Downloads directory.

  • Data Organization:

    • Prepared data is exported as Excel tables with any associated "description" attributes added as cell comments.

    • Statistical analyses export two tables per sheet: global statistics and group means.

  • Safety: The function checks for the R6 class and ensures that the requested data exists before proceeding.