mirror of
https://github.com/msberends/AMR.git
synced 2024-12-26 05:26:13 +01:00
Update clipboard.R
This commit is contained in:
parent
dbec56c68a
commit
fd04df5f9d
@ -27,7 +27,7 @@ clipboard_import <- function(sep = '\t',
|
|||||||
# use xclip package
|
# use xclip package
|
||||||
check_xclip()
|
check_xclip()
|
||||||
file <- pipe("xclip -o -selection c", "r")
|
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,
|
import_tbl <- read.delim(file = file,
|
||||||
@ -82,8 +82,8 @@ clipboard_export <- function(x,
|
|||||||
} else {
|
} else {
|
||||||
# use xclip package
|
# use xclip package
|
||||||
check_xclip()
|
check_xclip()
|
||||||
file <- pipe("xclip -i -selection c", "w")
|
file <- pipe("xclip -i -selection primary", "w")
|
||||||
gc(FALSE) # ?gc: A call of gc causes a garbage collection to take place.
|
on.exit(close(file))
|
||||||
}
|
}
|
||||||
|
|
||||||
write.table(x = x,
|
write.table(x = x,
|
||||||
|
Loading…
Reference in New Issue
Block a user