Nothing
#' Read from the clipboard
#'
#' Read tabular data from the clipboard.
#'
#' @param header A logical value indicating whether the file contains the names of the variables as its first line. Overrides the default \code{header=FALSE} option in \code{read.table()}.
#' @param ... Further arguments to be passed to \code{read.table}
#'
#' @return A data.frame
#'
#' @examples
#' \dontrun{
#' # To read CSV data with a header from the clipboard:
#' read.cb(header=TRUE, sep=',')
#' }
#'
#' @export
read.cb <- function(header=TRUE, ...) {
os <- Sys.info()[1]
if (os=="Darwin") content <- read.table(pipe("pbpaste"), header=header, ...)
else if (os=="Windows") content <- read.table(file="clipboard", header=header, ...)
else stop("Sorry, only works on Windows and Mac.")
content <- tibble::as_tibble(content)
return(content)
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.