read_clipboard: Read data frame from clipboard

View source: R/dataset_IO.R

read_clipboardR Documentation

Read data frame from clipboard

Description

A wrapper function to write.table for reading from the clipboard. Useful to quickly read data copied from a table or spreadsheet.

Usage

read_clipboard(
  header = T,
  sep = "\t",
  na.strings = c("", "NA"),
  check.names = T,
  stringsAsFactors = F,
  dec = ".",
  ...
)

Arguments

header

(lgl) Whether to use the first row as headers (column names).

sep

(chr) Which separator to use.

na.strings

(chr) Which cell values to interpret as missing data.

check.names

(lgl) Whether to convert illegal names to legal ones using base::make.names().

stringsAsFactors

(lgl) Whether to automatically convert strings to factors (GOD PLEASE NO).

dec

(chr) Which symbol to interpret as decimal separator.

...

Any other arguments passed to utils::read.table().

Examples

iris[-5] %>% cor %>% write_clipboard
iris %>% head %>% miss_add_random %>% write_clipboard

Deleetdk/kirkegaard documentation built on May 8, 2024, 12:27 a.m.