export_path: Export an object

Description Usage Arguments Details Value

View source: R/export.R

Description

Saves data given a full path.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
export_path(
  x = NULL,
  path = NULL,
  overwrite = TRUE,
  backup = FALSE,
  path_backup = NULL,
  export = TRUE,
  return = TRUE,
  dir = getwd(),
  file = deparse(substitute(x)),
  ext = .guess_ext(x, path),
  ...
)

Arguments

x

data.frame (or matrix) for most formats.

path

character. Concatenation of file, dir, and ext,

overwrite

logical.

backup

logical.

path_backup

like path,

export

logical. Indicates whether to actually carry res action. Intended to be used as a "catch all".

return

logical. Relevant ONLY if export == FALSE. Set to TRUE in order to preview what would be rendered.

dir

character. Folder name (with a trailing slash).

file

character. Bare file (i.e. without folderor extension),

ext

character. Bare extension (i.e. without a dot). Must be one of valid formats.

...

dots. Parameters to pass directly to the internally used export function. Important for explicitly specifying non-default ggplot2::ggsave() parameters, as well as specifying worksheets, etc. for an Excel-based export method.

Details

This function works similarly to export_ext() internally, but the order of the arguments are presented in a different order because it is assumed that path will be supplied. This not the assumption with the export_ext() function. If for some reason path is not provided, the dir, file, and ext defaults are used.

Note that the difference between export_path() and export_ext() is not as significant as it is for import_path() and import_ext().

Also, export_path() does not have an analogue to import_path_cleanly().

Value

object.


tonyelhabr/teproj documentation built on June 21, 2020, 12:56 p.m.