Description Usage Arguments Details Value
View source: R/copy_to_clipboard.R
This is only guaranteed for Windows; in the case of Linux you will
need to have the xclip command installed and visible on the PATH
and for Mac OS you will need to have pbcopy similarly available.
In any case the transfer to the clipboard is only activated while in
an interactive session.
1 | copy_to_clipboard(x, ..., file = con)
|
x |
a characeter string vector |
... |
additional arguments as for |
file |
a file or connection (usually left at the default) |
It behaves like base::cat but differs in three respects.
First, if file is left missing, in an interactive session,
the default file is a clipboard device, if possible.
Second, the return value is invisible(x) rather than
invisible(NULL) as it is for base::cat.
Third, it only has a copying side-effect if used in an interactive session.
In a non-interactive session it merely returns the x argument, invisibly.
Note the on Windows the function utils::writeClipboard offers
a much more extensive range of possibilities for communicating with the
clipboard device, but this facility is only available on Windows.
x, invisibly (as for a print method)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.