view_in_excel {depigner}R Documentation

View in Excel

Description

This function open in Excel a data frame, returning it invisibly to be "pipe-able". The operation is done only in interactive session, so that it has no effect on pipe-chains of code executed in batch.

Usage

view_in_excel(.data)

Arguments

.data

a data frame

Details

This function is useful for intermediate inspection of data, possibly in the middle of piped transformations.

This version: avoid unwanted execution (interactive session only), embed the correct extension in the temporary file, add BOM for Excel pleasure, and return the output invisibly, in case it is the last element of the chain.

Value

the '.data', unchanged and invisibly

Note

this function was originated during the conversation on Twitter started at https://twitter.com/brodriguesco/status/1447468259725434886?s=20

Examples

## Not run: 
  four_cyl_cars <- mtcars %>%
    view_in_excel() %>%
    dplyr::filter(cyl == 4) %>%
    view_in_excel()

  four_cyl_cars

## End(Not run)

[Package depigner version 0.9.1 Index]