export {wpa} | R Documentation |
Export 'wpa' outputs to CSV, clipboard, or save as images
Description
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.
Usage
export(
x,
method = "clipboard",
path = "wpa export",
timestamp = TRUE,
width = 12,
height = 9
)
Arguments
x |
Data frame or 'ggplot' object to be passed through. |
method |
Character string specifying the method of export. Valid inputs include:
|
path |
If exporting a file, enter the path and the desired file name,
excluding the file extension. For example, |
timestamp |
Logical vector specifying whether to include a timestamp in
the file name. Defaults to |
width |
Width of the plot |
height |
Height of the plot |
Value
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.
Author(s)
Martin Chan martin.chan@microsoft.com
See Also
Other Import and Export:
copy_df()
,
create_dt()
,
import_to_fst()
,
import_wpa()
,
standardise_pq()