toClipboard: Copy a data.frame to clipboard for pasting into Excel

Description Usage Arguments Examples

View source: R/toClipboard.R

Description

This function wraps around write.table to push a data frame to clipboard. It is pipable. Please note that large data.frames will cause the clipboard to crash.

Usage

1
2
3
4
5
6
7
8
toClipboard(
  x,
  file = "clipboard",
  sep = "\t",
  row.names = FALSE,
  na = "",
  ...
)

Arguments

x

the object to be written, preferably a matrix or data frame. If not, it is attempted to coerce x to a data frame.

file

either a character string naming a file or a connection open for writing. "" indicates output to the console.

sep

the field separator string. Values within each row of x are separated by this string.

row.names

either a logical value indicating whether the row names of x are to be written along with x, or a character vector of row names to be written.

na

the string to use for missing values in the data.

...

other parameters passed to write.table

Examples

1

West-End-Statistics/r-library-vakdr documentation built on Dec. 18, 2021, 7:16 p.m.