toXL: toXL copies a data.frame or matrix to the clipboard

View source: R/rutils.R

toXLR Documentation

toXL copies a data.frame or matrix to the clipboard

Description

toXL copies a data.frame or matrix to the clipboard so one can then switch to Excel and just type <ctrl> + V to paste the data in place

Usage

toXL(x, output = FALSE)

Arguments

x

a vector or matrix

output

- a boolean determining whether to print the object to the screen as well as the clipboard; defaults to FALSE

Value

Places the object 'x' into the clipboard ready for pasting

Examples

datamatrix <- matrix(data=rnorm(100),nrow=10,ncol=10)
colnames(datamatrix) <- paste0("A",1:10)
rownames(datamatrix) <- paste0("B",1:10)
toXL(datamatrix,output=TRUE)

haddonm/rutilsMH documentation built on July 21, 2023, 8:46 p.m.