read_clipboard | R Documentation |
Read text from clipboard.
read_clipboard(which = "tcltk")
read_clipboard_clipr()
read_clipboard_tcltk()
which |
(string) either |
read_clipboard_clipr()
uses clipr
implementation.
Encoding issues may occur on Windows.
read_clipboard_tcltk()
uses Tcl/Tk implementation of clipboard.
Tcl/Tk clipboard gets empty, if is window gets closed.
The functions in all cases must return a single string. Possible different conditions on clipboard:
one line of text;
several lines of text;
non-text object.
read_clipboard()
and read_clipboard_tcltk()
return a string from
clipboard. If the clipboard contains non-sting object, empty sting (""
)
is returned.
read_clipboard()
## Not run: \donttest{
testthat::expect_true(
all.equal(read_clipboard(), read_clipboard_tcltk())
)
testthat::expect_true(
all.equal(read_clipboard_clipr(), read_clipboard_tcltk())
)
}
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.