2020-10-27 00:21:24 +03:00
|
|
|
% Generated by roxygen2: do not edit by hand
|
|
|
|
% Please edit documentation in R/export.R
|
|
|
|
\name{export}
|
|
|
|
\alias{export}
|
|
|
|
\title{Export {wpa} outputs to CSV, clipboard, or save as images}
|
|
|
|
\usage{
|
|
|
|
export(
|
|
|
|
x,
|
|
|
|
method = "clipboard",
|
|
|
|
path = "wpa export",
|
|
|
|
timestamp = TRUE,
|
|
|
|
width = 12,
|
|
|
|
height = 9
|
|
|
|
)
|
|
|
|
}
|
|
|
|
\arguments{
|
2021-03-30 19:40:16 +03:00
|
|
|
\item{x}{Data frame or 'ggplot' object to be passed through.}
|
2020-10-27 00:21:24 +03:00
|
|
|
|
|
|
|
\item{method}{Character string specifying the method of export.
|
2021-03-04 21:33:28 +03:00
|
|
|
Valid inputs include:
|
|
|
|
\itemize{
|
|
|
|
\item \code{"clipboard"} (default if input is data frame)
|
|
|
|
\item \code{"csv"}
|
2021-03-30 19:40:16 +03:00
|
|
|
\item \code{"png"} (default if input is 'ggplot' object)
|
2021-03-04 21:33:28 +03:00
|
|
|
\item \code{"svg"}
|
|
|
|
\item \code{"jpeg"}
|
|
|
|
\item \code{"pdf"}
|
|
|
|
}}
|
2020-10-27 00:21:24 +03:00
|
|
|
|
2021-03-04 21:33:28 +03:00
|
|
|
\item{path}{If exporting a file, enter the path and the desired file name,
|
2021-03-05 17:05:00 +03:00
|
|
|
\emph{excluding the file extension}. For example, \code{"Analysis/SQ Overview"}.}
|
2020-10-27 00:21:24 +03:00
|
|
|
|
2021-03-04 21:33:28 +03:00
|
|
|
\item{timestamp}{Logical vector specifying whether to include a timestamp in
|
|
|
|
the file name. Defaults to \code{TRUE}.}
|
2020-10-27 00:21:24 +03:00
|
|
|
|
|
|
|
\item{width}{Width of the plot}
|
|
|
|
|
|
|
|
\item{height}{Height of the plot}
|
|
|
|
}
|
2021-03-04 21:33:28 +03:00
|
|
|
\value{
|
|
|
|
A different output is returned depending on the value passed to the \code{method}
|
|
|
|
argument:
|
|
|
|
\itemize{
|
|
|
|
\item \code{"clipboard"}: no return - data frame is saved to clipboard.
|
|
|
|
\item \code{"csv"}: CSV file containing data frame is saved to specified path.
|
2021-03-30 19:40:16 +03:00
|
|
|
\item \code{"png"}: PNG file containing 'ggplot' object is saved to specified path.
|
|
|
|
\item \code{"svg"}: SVG file containing 'ggplot' object is saved to specified path.
|
|
|
|
\item \code{"jpeg"}: JPEG file containing 'ggplot' object is saved to specified path.
|
|
|
|
\item \code{"pdf"}: PDF file containing 'ggplot' object is saved to specified path.
|
2021-03-04 21:33:28 +03:00
|
|
|
}
|
|
|
|
}
|
2020-10-27 00:21:24 +03:00
|
|
|
\description{
|
|
|
|
A general use function to export {wpa} outputs to CSV,
|
|
|
|
clipboard, or save as images. By default, \code{export()} copies
|
2021-03-30 19:40:16 +03:00
|
|
|
a data frame to the clipboard. If the input is a 'ggplot' object,
|
2020-10-27 00:21:24 +03:00
|
|
|
the default behaviour is to export a PNG.
|
|
|
|
}
|
2021-03-04 21:33:28 +03:00
|
|
|
\seealso{
|
|
|
|
Other Import and Export:
|
|
|
|
\code{\link{copy_df}()},
|
2021-03-05 14:18:35 +03:00
|
|
|
\code{\link{create_dt}()},
|
|
|
|
\code{\link{import_to_fst}()},
|
2021-03-05 17:05:00 +03:00
|
|
|
\code{\link{import_wpa}()},
|
|
|
|
\code{\link{standardise_pq}()}
|
2021-03-04 21:33:28 +03:00
|
|
|
}
|
|
|
|
\concept{Import and Export}
|