xview: External View

View source: R/xview.R

xviewR Documentation

External View

Description

This function will export an object to a file (using package "rio"). A system command is invoked to open the file afterwards.

Usage

xview(
  x,
  file = paste0("xview_", now(), ".xlsx"),
  deldep = TRUE,
  list_collapse = TRUE,
  open_doc = TRUE,
  ...
)

Arguments

x

Object to export (e.g. data.frame)

file

Specify filename. Directories will not be created.

deldep

Logical. Specify if deprecated files should be deleted. works only if file_path begins with "xview_" followed by 14 integer values (default for exporting new files).

list_collapse

Logical. Collapse list of dataframes? fsf::xview(split(iris, iris$Species), list_collapse = TRUE) will export a single sheet with visual splits between groups, while fsf::xview(split(iris, iris$Species), list_collapse = FALSE) will export 3 sheets (one for each species group)

open_doc

Logical. Should document be opened afterwards?

...

Further params passed to rio::export (e.g. overwrite, row.names, etc.)

Author(s)

Frederik Sachser

See Also

export write_dataframe_to_csv

Examples

#not run:
xview(split.data.frame(iris, iris$Species))

sachserf/sf documentation built on June 8, 2024, 4:23 p.m.