export_pptx {robmedExtra} | R Documentation |
Export a flextable of results from (robust) mediation analysis to 'Microsoft Powerpoint'
Description
Export a flextable
object to Microsoft
Powerpoint. This function is intended for tables of results from (robust)
mediation analysis. It is essentially a wrapper for
save_as_pptx()
.
Usage
export_pptx(object, file, ...)
## S3 method for class 'flextable'
export_pptx(object, file, ...)
## Default S3 method:
export_pptx(object, file, ...)
Arguments
object |
an object of class |
file |
a character string specifying the path an file name for the Microsoft Powerpoint file to be generated. |
... |
for the |
Value
The function is called for its side effect of creating a Microsoft Powerpoint file. It returns the path to the file invisibly.
Author(s)
Andreas Alfons
See Also
flextable()
, to_flextable()
Examples
data("BSG2014")
# seed to be used for the random number generator
seed <- 20211117
# perform mediation analysis via robust bootstrap test ROBMED
set.seed(seed)
robust_boot <- test_mediation(BSG2014,
x = "ValueDiversity",
y = "TeamCommitment",
m = "TaskConflict",
robust = TRUE)
# construct flextable of results
ft <- to_flextable(robust_boot)
# export to Microsoft Powerpoint
file_name <- tempfile(fileext = ".pptx")
export_pptx(ft, file = file_name)