/dports/textproc/R-cran-readr/readr/R/ |
H A D | type_convert.R | 52 col_types <- keep_character_col_types(df, col_types) 63 col_types = col_types, 84 if (is.null(col_types)) { 85 return(col_types) 89 if (is.character(col_types)) { 90 if (length(col_types) != 1) { 93 if (nchar(col_types) != length(df)) { 103 col_types <- paste(substring(col_types, idx, idx), collapse = "") 104 return(col_types) 108 col_types$cols <- col_types$cols[names(col_types$cols) %in% char_cols] [all …]
|
H A D | read_delim.R | 170 col_names = col_names, col_types = col_types, 180 delim = delim, col_names = col_names, col_types = col_types, 206 col_types = NULL, argument 231 col_names = col_names, col_types = col_types, 245 col_types = col_types, 301 col_names = col_names, col_types = col_types, 309 col_types = col_types, 350 col_names = col_names, col_types = col_types, 359 col_types = col_types, 418 col_types = col_types, tokenizer = tokenizer, locale = locale [all …]
|
H A D | read_delim_chunked.R | 65 col_names = TRUE, col_types = NULL, argument 80 col_names = col_names, col_types = col_types, locale = locale, skip = skip, 88 read_csv_chunked <- function(file, callback, chunk_size = 10000, col_names = TRUE, col_types = NULL, argument 99 tokenizer = tokenizer, col_names = col_names, col_types = col_types, locale = locale, 107 read_csv2_chunked <- function(file, callback, chunk_size = 10000, col_names = TRUE, col_types = NUL… argument 119 tokenizer = tokenizer, col_names = col_names, col_types = col_types, locale = locale, 127 read_tsv_chunked <- function(file, callback, chunk_size = 10000, col_names = TRUE, col_types = NULL, argument 138 tokenizer = tokenizer, col_names = col_names, col_types = col_types, locale = locale,
|
/dports/textproc/R-cran-vroom/vroom/tests/testthat/ |
H A D | test-vroom_fwf.R | 6 df <- vroom_fwf(test_path("fwf-trailing.txt"), spec, col_types = list()) 12 x <- vroom_fwf(test_path("fwf-trailing.txt"), spec, col_types = list()) 55 out1 <- vroom_fwf(x, fwf_empty(x), col_types = 'd-d') 220 vroom_fwf(I("foo bar baz\n1 2\n"), col_types = list()) 224 vroom_fwf(I("foo bar baz\n1 2 \n"), col_types = list()) 228 vroom_fwf(I("foo bar baz\n1 2 \n"), col_types = list()) 232 vroom_fwf(I("foo bar baz\n1 2 \n"), col_types = list()) 272 vroom_fwf(I("A\n a\n"), col_types = list()) 284 vroom_fwf(I("1 2 3\n"), positions, col_types = list()), 349 out <- vroom_fwf(f, fwf_widths(c(3, 3)), col_types = "ii") [all …]
|
H A D | test-vroom.R | 126 col_types = list() 138 col_types = list() 150 col_types = list() 162 col_types = list() 174 col_types = list() 432 vroom(f, col_types = list()), 478 res <- vroom(f, col_types = cols(Y = "c")) 623 col_types = list( 641 out <- vroom(I(""), col_types = "ii") 768 test_vroom("x,y\n1,2\n", col_types = "i", [all …]
|
H A D | test-select.R | 2 …expect_equal(colnames(vroom(vroom_example("mtcars.csv"), col_select = 1, col_types = list())), "mo… 4 …expect_equal(colnames(vroom(vroom_example("mtcars.csv"), col_select = 1:3, col_types = list())), c… 14 expect_equal(colnames(vroom(vroom_example("mtcars.csv"), col_select = -1, col_types = list())), 18 …expect_equal(colnames(vroom(vroom_example("mtcars.csv"), col_select = -(1:3), col_types = list())), 22 …expect_equal(colnames(vroom(vroom_example("mtcars.csv"), col_select = -c(1, 5, 7), col_types = lis… nameattr in list 26 …l(colnames(vroom(vroom_example("mtcars.csv"), col_select = -c(model, hp, wt), col_types = list())), nameattr in list 47 col_types = list() 57 …vroom(vroom_example("mtcars.csv"), id = "path", col_select = list(model, mpg, path), col_types = l… nameattr in list 62 …vroom(vroom_example("mtcars.csv"), id = "path", col_select = list(path, model, mpg), col_types = l… nameattr in list 68 res <- vroom(I("foo\tbar\n1\t2\n"), col_names = FALSE, col_select = 1, col_types = list()) [all …]
|
H A D | test-factor.R | 3 col_types = list(X1 = col_factor(levels = c("a", "b"))), 19 col_types = list(X1 = col_factor(levels = c("a", "b"))), 33 col_types = list(X1 = col_factor(levels = NULL)), 40 col_types = list(X1 = col_factor(levels = NULL)), 47 col_types = list(X1 = "f"), 84 col_types = cols(col_factor(c("A", "\uC4"))), 92 col_types = list(X1 = col_factor(levels = "a")), 96 col_types = list(X1 = col_factor(levels = "a ")), 100 col_types = list(X1 = col_factor(levels = c("a ", "a"))), 131 col_types = list(X1 = col_factor(levels = expected)), [all …]
|
H A D | test-connection.R | 4 expected <- vroom(vroom_example("mtcars.csv"), col_types = list()) 9 actual <- vroom(file(vroom_example("mtcars.csv"), ""), delim = ",", col_types = list()) 25 expected <- vroom(out, col_types = list()) 30 actual <- vroom(file(out), col_types = list()) 37 expect_error(vroom(file(vroom_example("mtcars.csv")), col_types = list()), "not large enough") 48 expect_named(vroom(f, delim = ",", col_types = list()), c("a", "b", "c")) 49 expect_named(vroom(f, col_types = list()), c("a", "b", "c")) 52 …expect_equal(vroom(f, col_names = FALSE, delim = ",", col_types = list()), tibble::tibble(X1 = "a"… 53 …expect_equal(vroom(f, col_names = FALSE, col_types = list()), tibble::tibble(X1 = "a", X2 = "b", X… 61 x <- vroom(file(f), delim = ",", col_types = list()) [all …]
|
H A D | helper.R | 1 test_vroom <- function(content, delim = ",", col_types = list(), ..., equals) { argument 10 vroom(content, delim = delim, col_types = col_types, ...), 18 vroom(content, delim = delim, col_types = col_types, ...), 36 res <- vroom(con, delim = delim, col_types = col_types, ...) 50 col_names = FALSE, col_types = "n", ..., 57 col_names = FALSE, col_types = cols(X1 = col_datetime(format = format)), ..., 64 col_names = FALSE, col_types = cols(X1 = col_date(format = format)), ..., 71 col_names = FALSE, col_types = cols(X1 = col_time(format = format)), ...,
|
H A D | test-problems.R | 3 x <- vroom(I("x,y\n1,2\n1,1.x\n"), col_types = "dd", altrep = FALSE) 23 x <- vroom(c(out1, out2), delim = ",", col_types = "dd", altrep=F) nameattr 35 …expect_warning(probs3 <- problems(vroom(I("x,y,z\n1,2\n"), col_names = TRUE, col_types = "ddd", al… 41 …expect_warning(probs3 <- problems(vroom(I("x,y,z\n1,2\n"), col_names = FALSE, col_types = "ddd", a… 47 …expect_warning(probs4 <- problems(vroom(I("x,y\n1,2,3,4\n"), col_names = TRUE, col_types = "dd", a… 78 res <- vroom(I("x\nxyz\n"), delim = ",", col_types = list(type), altrep = TRUE) 84 res <- vroom(I("x\nxyz\n"), delim = ",", col_types = list(type), altrep = TRUE) 100 res <- vroom(I("x\n1\n2\n3\n4\n5\na"), col_types = "i", delim = ",") 116 x <- vroom(I("a,b,c\nx,y,z,,"), altrep = FALSE, col_types = "ccc") 121 y <- vroom(I("a,b,c\nx,y,z\nx,y,z,,"), altrep = FALSE, col_types = "ccc") [all …]
|
H A D | test-dbl.R | 2 res <- vroom(I("1e-63,1e-64\n"), delim = ",", col_types = "dd", col_names = FALSE) 10 col_types='d', col_names=FALSE) 14 col_types='d', col_names=FALSE) 19 test_vroom(I("x\n1\n2\n"), delim = ",", col_types = "d", na = "1", 24 test_vroom(I("x\nNaN\n"), delim = ",", col_types = "?", 29 test_vroom(I("x\nNaNa\n"), delim = ",", col_types = "?", 34 test_vroom(I("x\nInf\n-Inf\n+Inf"), delim = ",", col_types = "?", 39 test_vroom(I("x\nInfa\n-Infb\n+Infc"), delim = ",", col_types = "?",
|
H A D | test-path.R | 1 mt <- vroom(vroom_example("mtcars.csv"), col_types = list()) 7 expect_error(vroom(tf, col_types = list()), "does not exist") 11 expect_equal(vroom(vroom_example("mtcars.csv.gz"), col_types = list()), mt) 12 expect_equal(vroom(vroom_example("mtcars.csv.bz2"), col_types = list()), mt) 13 expect_equal(vroom(vroom_example("mtcars.csv.xz"), col_types = list()), mt) 14 expect_equal(vroom(vroom_example("mtcars.csv.zip"), col_types = list()), mt) 21 expect_equal(vroom(url, col_types = list()), mt) 28 expect_equal(vroom(url, col_types = list()), mt) 35 …expect_error(vroom(url, col_types = list()), "Reading from remote `bz2` compressed files is not su…
|
H A D | test-big-int.R | 5 test_vroom("foo,bar,baz\n1,,3\n", col_types = list(.default = "I"), delim = ",", 10 test_vroom("foo,bar,baz\n1,1.5,3\n", col_types = list(.default = "I"), delim = ",", 15 test_vroom("foo,bar,baz\n1,32xyz,3\n", col_types = list(.default = "I"), delim = ",", 20 test_vroom("foo,bar,baz\n1,2147483647,3\n", col_types = list(.default = "I"), delim = ",", 25 test_vroom("foo,bar,baz\n1,2147483648,3\n", col_types = list(.default = "I"), delim = ",", 30 …test_vroom("foo,bar,baz\n1,9223372036854775807,3\n", col_types = list(.default = "I"), delim = ",", 35 …test_vroom("foo,bar,baz\n1,9223372036854775808,3\n", col_types = list(.default = "I"), delim = ",", 41 test_vroom(I("x\n1\n2\n"), delim = ",", col_types = "I", na = "1",
|
H A D | test-int.R | 3 test_vroom("foo,bar,baz\n1,,3\n", col_types = list(.default = "i"), delim = ",", 8 test_vroom("foo,bar,baz\n1,1.5,3\n", col_types = list(.default = "i"), delim = ",", 13 test_vroom("foo,bar,baz\n1,32xyz,3\n", col_types = list(.default = "i"), delim = ",", 18 test_vroom("foo,bar,baz\n1,2147483647,3\n", col_types = list(.default = "i"), delim = ",", 22 test_vroom("foo,bar,baz\n1,2147483648,3\n", col_types = list(.default = "i"), delim = ",", 28 test_vroom(I("x\n1\n2\n"), delim = ",", col_types = "i", na = "1",
|
H A D | test-multi-file.R | 2 res <- vroom(vroom_example("mtcars.csv"), id = "filename", col_types = list()) 17 res <- vroom(files, id = "filename", col_types = list()) 37 res <- vroom(files, id = "filename", col_types = list()) 64 res <- vroom::vroom(files, col_types = list()) list 89 res <- vroom::vroom(files, col_types = list()) list 98 expect_error(vroom::vroom(files, col_types = list()), "must all have") list 104 expect_error(vroom::vroom(files, col_types = list()), "consistent column names") list 110 res <- vroom(files, col_types = list()) 115 x <- vroom(c(vroom_example("mtcars.csv"), vroom_example("mtcars.csv")), col_types = list()) nameattr in list
|
/dports/www/grafana8/grafana-8.3.6/vendor/github.com/apache/arrow/r/R/ |
H A D | csv.R | 162 col_types <- schema 180 col_types = col_types, 508 if (!is.null(col_types) && !inherits(col_types, "Schema")) { 520 col_types = col_types, nameattr 539 if (is.character(col_types)) { 540 if (length(col_types) != 1L) { 543 n <- nchar(col_types) 567 col_types <- keep(col_types, ~!is.null(.x)) 568 col_types <- schema(!!!col_types) 571 if (!is.null(col_types)) { [all …]
|
/dports/textproc/R-cran-readxl/readxl/R/ |
H A D | read_excel.R | 131 col_names = col_names, col_types = col_types, 155 col_names = col_names, col_types = col_types, 175 col_names = col_names, col_types = col_types, 203 col_types <- check_col_types(col_types) 211 col_names = col_names, col_types = col_types, 287 if (is.null(col_types)) { 290 stopifnot(is.character(col_types), length(col_types) > 0, !anyNA(col_types)) 292 blank <- col_types == "blank" 295 col_types[blank] <- "skip" 303 paste0("'", col_types[!ok], "' [", seq_along(col_types)[!ok], "]"), [all …]
|
/dports/databases/arrow/apache-arrow-6.0.1/r/R/ |
H A D | csv.R | 160 col_types <- schema 178 col_types = col_types, 522 if (!is.null(col_types) && !inherits(col_types, "Schema")) { 534 col_types = col_types, nameattr 553 if (is.character(col_types)) { 554 if (length(col_types) != 1L) { 557 n <- nchar(col_types) 581 col_types <- keep(col_types, ~ !is.null(.x)) 582 col_types <- schema(!!!col_types) 585 if (!is.null(col_types)) { [all …]
|
/dports/textproc/R-cran-readxl/readxl/tests/testthat/ |
H A D | test-col-types.R | 7 col_types = c("foo", "numeric", "text", "bar") 17 col_types = rep_len(c("blank", "text"), length.out = 5) 26 read_excel(test_sheet("types.xlsx"), col_types = character()), 30 read_excel(test_sheet("types.xlsx"), col_types = 1:3), 42 col_types = c("numeric", "text", "numeric", "numeric", "text") 47 col_types = c("numeric", "text", "numeric", "numeric", "text") 55 df <- read_excel(test_sheet("iris-excel-xls.xls"), col_types = "text") 83 df <- read_excel(test_sheet("types.xlsx"), col_types = ctypes) 87 df <- read_excel(test_sheet("types.xls"), col_types = ctypes) 128 types <- read_excel(test_sheet("list_type.xlsx"), col_types = "list") [all …]
|
H A D | test-coercion.R | 8 col_types = c("logical", "text") 21 col_types = c("logical", "text") 36 col_types = "date" 50 col_types = "date" 66 col_types = "numeric" 79 col_types = "numeric" 95 col_types = c("text", "text") 105 col_types = c("text", "text") 128 xlsx <- read_excel(test_sheet("texty-dates-xlsx.xlsx"), col_types = "text") 129 xls <- read_excel(test_sheet("texty-dates-xls.xls"), col_types = "text")
|
H A D | test-problems.R | 8 col_types = "numeric" 16 col_types = "numeric" 24 col_types = "numeric" 33 col_types = "numeric" 41 col_types = "numeric"
|
/dports/textproc/R-cran-readr/readr/tests/testthat/ |
H A D | test-problems.R | 9 delim.skip0 <- problems(read_csv("aa,bb,cc\n", col_names = F, col_types = "dcc", lazy = FALSE)) 10 delim.skip1 <- problems(read_csv("aa,bb,cc\n", col_names = F, col_types = "_dc", lazy = FALSE)) 11 delim.skip2 <- problems(read_csv("aa,bb,cc\n", col_names = F, col_types = "--d", lazy = FALSE)) 17 delim.sk0.2 <- problems(read_tsv("aa\tbb\tcc\n", col_names = F, col_types = "dcd")) 18 delim.sk1.2 <- problems(read_tsv("aa\tbb\tcc\n", col_names = F, col_types = "_dd")) 24 fwf.skip0 <- problems(read_fwf("aabbcc\n", fwf.pos, col_types = "dcc")) 25 fwf.skip1 <- problems(read_fwf("aabbcc\n", fwf.pos, col_types = "_dc")) 26 fwf.skip2 <- problems(read_fwf("aabbcc\n", fwf.pos, col_types = "--d")) 27 fwf.sk0.2 <- problems(read_fwf("aabbcc\n", fwf.pos, col_types = "dcd")) 28 fwf.sk1.2 <- problems(read_fwf("aabbcc\n", fwf.pos, col_types = "d-d")) [all …]
|
H A D | test-type-convert.R | 17 expect_error(type_convert(df, col_types = "i"), "must have consistent lengths") 19 expect_error(type_convert(df, col_types = c("i", "b")), "must be a single string") 21 expect_equal(type_convert(df, col_types = "_ic"), df_conv) 27 expect_equal(type_convert(df, col_types = cols(y = "i")), df_conv) 29 expect_equal(type_convert(df, col_types = cols(y = col_integer(), z = col_character())), df_conv) 32 expect_equal(type_convert(df, col_types = cols(x = "c", y = "i")), df_conv) 38 col_types = cols(.default = col_character())
|
/dports/textproc/R-cran-readxl/readxl/inst/doc/ |
H A D | cell-and-column-types.R | 23 col_types = c("guess", "skip", "guess", "skip", "skip", "skip") 28 read_excel(readxl_example("clippy.xlsx"), col_types = c("text", "list"))) 39 read_excel(readxl_example("datasets.xlsx"), col_types = ct) 43 col_types = c("logical", "text")) 51 col_types = c("numeric", "text")) 59 col_types = c("date", "text")) 67 col_types = c("text", "text"))
|
/dports/textproc/R-cran-readr/readr/tests/testthat/_snaps/edition-1/ |
H A D | read-csv.md | 4 out3 <- read_csv(I("v1,v2\n\n1,2\n\n3,4"), col_types = "i") 6 Unnamed `col_types` should have the same length as `col_names`. Using smaller of the two. 15 out4 <- read_csv(I("v1,v2\n#foo\n1,2\n#bar\n3,4"), col_types = "i", comment = "#") 17 Unnamed `col_types` should have the same length as `col_names`. Using smaller of the two. 23 # too few or extra col_types generates warnings 26 out1 <- read_csv(I("v1,v2\n1,2"), col_types = "i", lazy = FALSE) 28 Unnamed `col_types` should have the same length as `col_names`. Using smaller of the two. 36 out4 <- read_csv(I("x,y\n1,#comment"), comment = "#", col_types = "cc")
|