DescTools (version 0.99.8.1)

ClipToVect: Reformat a Table in the Clipboard as Vector

Description

A table in the clipboard can not easily be inserted in the R-code. Though it can be accessed by read.table(clipboard), for saving purposes it then has to be saved by write.table, which seems clumsy if the file has to be used by others. ClipToVect reformats the table in the way that it can be defined as a data.frame and so be pasted directly in the source code. The option will of course only be interesting for small datasets.

Usage

ClipToVect(doubleQuote = TRUE)

Arguments

doubleQuote
logical. Defines if text should be put in doubleQuotes or singleQuotes. Default is double quotes.

Value

  • the formatted text is copied to clipboard.

Details

For using this function just copy a cell range in Excel for exmple, then run ClipToVect and insert the clipboard in the code file.

See Also

dput