pasteFromExcel: Paste data from Excel into an R variable via clipboard

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/pasteFromExcel.r

Description

A fast way to transfer small amounts of data from Excel to R.

Usage

1
2
3
4
5
6
pasteFromExcel(sep = "\t", check.names = FALSE, 
  stringsAsFactors = default.stringsAsFactors(), 
  header = FALSE, rowheader = FALSE, 
  convertFormattedNumbers = TRUE, 
  simplify = TRUE, drop = TRUE, 
  na.strings=c("NA", "", "#DIV/0!"), zero.strings = "-", ...)

Arguments

sep

tab for clipboard

check.names

keep default

stringsAsFactors

keep default

header

did you copy the column header(s) too?

rowheader

did you copy the row header(s)/name(s) too?

convertFormattedNumbers

do you want to eliminate dollar signs, commas, etc. in formatted numbers (TRUE) or read those cells as character values (FALSE)?

simplify

should matrices with length 1 in one of the dimensions be converted to vectors (TRUE)?

drop

if TRUE and one of the dimensions of the matrix has length 1, return a vector

na.strings

strings that you want considered to be NA

zero.strings

strings that you want considered to be zero

...

arguments to be passed to other methods

Details

In Excel, copy data to the clipboard then use this function to paste into R.

Note: The actual values exchanged depend on Excel's translation to character data when placing on the clipboard.

Value

An R object

Author(s)

dmm

See Also

readFromExcel, readFromCsv

Examples

1
2
3
# In Excel, copy some cells to the clipboard. Back in R ...
### NOT RUN
# x <- pasteFromExcel()

trinostics/excelRio documentation built on June 18, 2020, 4:41 p.m.