copyToClipboard: Copy data to the clipboard

Description Usage Arguments Value Note Examples

View source: R/copyToClipboard.R

Description

copyToClipboard is a utility function that copies data to the clipboard. The data can then be copied in another program like excel.

Usage

1
2
3
4
copyToClipboard(x, ...)

## S3 method for class 'antaresDataList'
copyToClipboard(x, what, ...)

Arguments

x

an object used to select a method.

...

arguments passed to write.table

what

character or numeric indicating which element to copy to clipboard (areas, links, clusters or districts)

Value

The function does not return anything. It is only used to interact with the clipboard

Note

The function is useful only for small data objects: for a table, only the 50000 rows are copied to clipboard. If the table to copy is longer, either use filters to reduce the number of rows or write the table in text file with write.table

Examples

1
2
3
4
5
6
7
8
9
 # This only works on Windows systems
## Not run: 
x <- data.frame(a = sample(10), b = sample(10))

copyToClipboard(x)

# Try to open excel and use CTRL + V to copy the data in a spreadsheet.

## End(Not run)

antaresRead documentation built on Feb. 13, 2019, 5:04 p.m.