A general use function to export 'wpa' outputs to CSV, clipboard, or save as
images. By default, export()
copies a data frame to the clipboard. If the
input is a 'ggplot' object, the default behaviour is to export a PNG.
export(
x,
method = "clipboard",
path = "wpa export",
timestamp = TRUE,
width = 12,
height = 9
)
Data frame or 'ggplot' object to be passed through.
Character string specifying the method of export. Valid inputs include:
"clipboard"
(default if input is data frame)
"csv"
"png"
(default if input is 'ggplot' object)
"svg"
"jpeg"
"pdf"
If exporting a file, enter the path and the desired file name,
excluding the file extension. For example, "Analysis/SQ Overview"
.
Logical vector specifying whether to include a timestamp in
the file name. Defaults to TRUE
.
Width of the plot
Height of the plot
A different output is returned depending on the value passed to the method
argument:
"clipboard"
: no return - data frame is saved to clipboard.
"csv"
: CSV file containing data frame is saved to specified path.
"png"
: PNG file containing 'ggplot' object is saved to specified path.
"svg"
: SVG file containing 'ggplot' object is saved to specified path.
"jpeg"
: JPEG file containing 'ggplot' object is saved to specified path.
"pdf"
: PDF file containing 'ggplot' object is saved to specified path.
Other Import and Export:
copy_df()
,
create_dt()
,
import_to_fst()
,
import_wpa()
,
standardise_pq()