From 1b3daebc847494ea76187f1dfe4c5e5b1d55b049 Mon Sep 17 00:00:00 2001 From: MS Berends <31037261+msberends@users.noreply.github.com> Date: Fri, 23 Mar 2018 14:52:56 +0100 Subject: [PATCH] Remove Windows only function --- R/clipboard.R | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/R/clipboard.R b/R/clipboard.R index 1f6072cc..09f6baaa 100644 --- a/R/clipboard.R +++ b/R/clipboard.R @@ -64,21 +64,17 @@ clipboard_export <- function(x, as.integer() x <- get(x) - - if (size > 25 * 1024 * 1024) { - # above 25 MB use a hacker function - writeClipboard(knitr::kable(x)) - } else { - # set size of clipboard to 125% of the object size of x - write.table(x = x, - file = paste0("clipboard-", size * 1.25), - sep = sep, - na = na, - row.names = FALSE, - col.names = header, - dec = dec, - quote = FALSE) - } + + # set size of clipboard to 125% of the object size of x + write.table(x = x, + file = paste0("clipboard-", size * 1.25), + sep = sep, + na = na, + row.names = FALSE, + col.names = header, + dec = dec, + quote = FALSE) + cat("Successfully exported to clipboard:", NROW(x), "obs. of", NCOL(x), "variables.\n") }