mirror of
https://github.com/msberends/AMR.git
synced 2024-12-25 18:06:12 +01:00
clipboard error
This commit is contained in:
parent
a59d0661f7
commit
d8f70a74de
@ -71,7 +71,7 @@ clipboard_import <- function(sep = '\t',
|
||||
date_format = '%Y-%m-%d',
|
||||
time_format = '%H:%M',
|
||||
remove_ASCII_escape_char = FALSE,
|
||||
tz = Sys.timezone(),
|
||||
tz = "UTC",
|
||||
encoding = "UTF-8",
|
||||
info = TRUE) {
|
||||
|
||||
|
2
R/misc.R
2
R/misc.R
@ -117,7 +117,7 @@ tbl_parse_guess <- function(tbl,
|
||||
date_format = '%Y-%m-%d',
|
||||
time_format = '%H:%M',
|
||||
decimal_mark = '.',
|
||||
tz = Sys.timezone(),
|
||||
tz = "UTC",
|
||||
encoding = "UTF-8",
|
||||
remove_ASCII_escape_char = FALSE,
|
||||
na = c("", "NA", "NULL")) {
|
||||
|
@ -10,8 +10,8 @@ clipboard_import(sep = "\\t", quote = "", header = TRUE, dec = ".",
|
||||
na = c("", "NA", "NULL"), stringsAsFactors = FALSE, startrow = 1,
|
||||
as_vector = TRUE, guess_col_types = TRUE, date_names = "en",
|
||||
date_format = "\%Y-\%m-\%d", time_format = "\%H:\%M",
|
||||
remove_ASCII_escape_char = FALSE, tz = Sys.timezone(),
|
||||
encoding = "UTF-8", info = TRUE)
|
||||
remove_ASCII_escape_char = FALSE, tz = "UTC", encoding = "UTF-8",
|
||||
info = TRUE)
|
||||
|
||||
clipboard_export(x, sep = "\\t", dec = ".", na = "", header = TRUE,
|
||||
info = TRUE)
|
||||
|
@ -10,12 +10,14 @@ test_that("clipboard works", {
|
||||
skip_if_not(clipr::clipr_available())
|
||||
|
||||
clipboard_export(antibiotics)
|
||||
imp <- clipboard_import()
|
||||
expect_identical(as.data.frame(antibiotics, stringsAsFactors = FALSE),
|
||||
clipboard_import())
|
||||
imp)
|
||||
|
||||
clipboard_export(septic_patients[1:100,])
|
||||
imp <- clipboard_import(guess_col_types = TRUE,
|
||||
stringsAsFactors = FALSE)
|
||||
expect_identical(as.data.frame(tbl_parse_guess(septic_patients[1:100,]),
|
||||
stringsAsFactors = FALSE),
|
||||
clipboard_import(guess_col_types = TRUE,
|
||||
stringsAsFactors = FALSE))
|
||||
imp)
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user