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:

  • "clipboard" (default if input is data frame)

  • "csv"

  • "png" (default if input is 'ggplot' object)

  • "svg"

  • "jpeg"

  • "pdf"

path

If exporting a file, enter the path and the desired file name, excluding the file extension. For example, "Analysis/SQ Overview".

timestamp

Logical vector specifying whether to include a timestamp in the file name. Defaults to TRUE.

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:

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()


[Package wpa version 1.9.1 Index]