R/clip.R

Defines functions clip

Documented in clip

### -*- Coding: utf-8 -*-
### Author: Charles-Édouard Giguère
###
### Send a table-like object to clipboard.

clip <- function(x, sep = "\t", row.names = FALSE, quote = FALSE, ...){
    if(!is.matrix(x) & !is.data.frame(x)){
        x <- try(as.data.frame(x), silent = TRUE)
        if(inherits(x, "try-error"))
            stop("x cannot be coerced to a data.frame object")
    }

    clipr::write_clip(x, sep = sep, row.names = row.names, quote = quote,
                      object_type = "auto", ...)
}

Try the CUFF package in your browser

Any scripts or data that you put into this service are public.

CUFF documentation built on March 31, 2023, 6:46 p.m.