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 "flextable", or an object containing results from (robust) mediation analysis that can be converted to the subclass "mediation_flextable" via to_flextable().

file

a character string specifying the path an file name for the Microsoft Powerpoint file to be generated.

...

for the "flextable" method, additional arguments to be passed down to prop_section() for defining page composition such as page size, page orientation, and margins. For the default method, additional arguments to be passed down to to_flextable() for converting results from (robust) mediation analysis.

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

export_docx()

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)


[Package robmedExtra version 0.1.0 Index]