parse_clipb: Parse the contents in clipboard to form a tibble

Description Usage Arguments Value Author(s) See Also Examples

Description

Tables copied from spreadsheet or similar software into clipboard are usually a character vector containing '\t'. This function parses the clipboard and tries to coerce the string vector to a tibble. It is a wrapper of readr:read_table2. The arguments directly come from read_table2.

Usage

1
2
3
4
parse_clipb(var_row = 1L, col_names = var_row > 0, col_types = NULL,
  locale = readr::default_locale(), na = "NA", n_max = Inf,
  guess_max = min(n_max, 1000), progress = readr::show_progress(),
  comment = "", skip_empty_rows = TRUE)

Arguments

var_row

integer, the row index of the header row. Default 1. If no header is needed, put it 0. If NULL, it will guess the colnames.

col_names

either TRUE, FALSE or a character vector of column names.

col_types

either of NULL, a cols() specification, or a string. See vignette("readr") for more details.

locale

the locale controls defaults that vary from place to place.

n_max

maximum number of records to read.

guess_max

maximum number of records to use for guessing column types.

progress

display a progress bar? By default it will only display in an interactive session and not while knitting a document.

skip_empty_rows

should blank rows be ignored altogether? i.e. If this option is TRUE then blank rows will not be represented at all. If it is FALSE then they will be represented by NA values in all the columns.

Value

A tibble (coerced using read_table2). If fails, return NULL

Author(s)

Yiying Wang, wangy@aetna.com

See Also

read_table2 and clipboard

Examples

1
2
3
4
## Not run: 
parse_clipb()

## End(Not run)

madlogos/aseskit documentation built on June 26, 2019, 12:17 a.m.