Description Usage Arguments Note Author(s) Examples
Thin wrapper for reading from windows/OSX clipboards with the most-used defaults. The function first reads in the lines, checks if the delimiter is present in the lines and then converts it to a data.frame.
1 2 3 | read_clipboard(delim = "\t", ...)
from_clipboard(delim = "\t", ...)
|
delim |
The delimiter for columns. |
... |
Further arguments passed to |
This function only works on Windows or OSX, and the data-size cannot exceed 128kb in Windows.
Kristian D. Olsen
1 2 3 4 5 6 7 8 9 10 11 | ## Not run:
# Only works on Windows and OSX
df <- data.frame("String" = c("A", "B"), "Int" = c(1:2L), "Percent" = c(0.5, 0.75))
to_clipboard(df)
x <- from_clipboard()
# All equal - except attributes
# (readr attaches attr "problems")
all.equal(x, df, check.attributes = FALSE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.