paste_table: Copy a table from R to clipboard or paste a table from...

View source: R/paste_table.R

paste_tableR Documentation

Copy a table from R to clipboard or paste a table from clipboard into R.

Description

Allows the user to easily and quickly copy or paste tables from or to R in a format that is compatible with Microsoft Excel.

Usage

paste_table()

copy_table(obj, size = 4096)

Arguments

obj

Object that should be copied to clipboard

Details

It really shines as a quick hacky tool for exploration, should never be used in a script meant to be reproducible, for obvious reasons.

Source

"Using the Windows Clipboard, or Passing Data Quickly From Excel to R and Back Again" https://www.r-bloggers.com/using-the-windows-clipboard-or-passing-data-quickly-from-excel-to-r-and-back-again/

"Stackoverflow" https://stackoverflow.com/questions/10959521/how-to-write-to-clipboard-on-ubuntu-linux-in-r

Examples

# Import table in clipboard as an object
# Do not pass any argument
df <- paste_table()

# Copy a table to clipboard
copy_table(df)


MarcioFCMartins/MMartins documentation built on May 1, 2024, 2:20 a.m.