1
0
mirror of https://github.com/msberends/AMR.git synced 2024-12-25 18:06:12 +01:00

Update clipboard.R

This commit is contained in:
MS Berends 2018-03-29 13:23:02 +02:00 committed by GitHub
parent dbec56c68a
commit fd04df5f9d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -27,7 +27,7 @@ clipboard_import <- function(sep = '\t',
# use xclip package
check_xclip()
file <- pipe("xclip -o -selection c", "r")
gc(FALSE) # ?gc: A call of gc causes a garbage collection to take place.
on.exit(close(file))
}
import_tbl <- read.delim(file = file,
@ -82,8 +82,8 @@ clipboard_export <- function(x,
} else {
# use xclip package
check_xclip()
file <- pipe("xclip -i -selection c", "w")
gc(FALSE) # ?gc: A call of gc causes a garbage collection to take place.
file <- pipe("xclip -i -selection primary", "w")
on.exit(close(file))
}
write.table(x = x,