Skip to content

Commit 98b6171

Browse files
committed
Remove read_table2()
1 parent 4bfeef0 commit 98b6171

File tree

5 files changed

+4
-70
lines changed

5 files changed

+4
-70
lines changed

NAMESPACE

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ export(read_lines_raw_chunked)
100100
export(read_log)
101101
export(read_rds)
102102
export(read_table)
103-
export(read_table2)
104103
export(read_tsv)
105104
export(read_tsv_chunked)
106105
export(readr_example)

NEWS.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# readr (development version)
22

3+
* `read_table2()` has been removed from readr. This function was deprecated in
4+
readr 2.0.0 (2021-07-20) in favor of `read_table()`. Use `read_table()`
5+
instead.
6+
37
* The `quote_escape` parameter has been removed from `write_delim()`,
48
`write_csv()`, `write_csv2()`, `write_excel_csv()`, `write_excel_csv2()`,
59
`write_tsv()`, `format_delim()`, `format_csv()`, `format_csv2()`, and

R/read_table.R

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -58,45 +58,6 @@ read_table <- function(
5858
)
5959
}
6060

61-
#' Read whitespace-separated columns into a tibble
62-
#'
63-
#' @description
64-
#' `r lifecycle::badge("deprecated")`
65-
#'
66-
#' This function is deprecated because we renamed it to [read_table()] and
67-
#' removed the old `read_table` function, which was too strict for most cases
68-
#' and was analogous to just using `read_fwf()`.
69-
#' @keywords internal
70-
#' @export
71-
read_table2 <- function(
72-
file,
73-
col_names = TRUE,
74-
col_types = NULL,
75-
locale = default_locale(),
76-
na = "NA",
77-
skip = 0,
78-
n_max = Inf,
79-
guess_max = min(n_max, 1000),
80-
progress = show_progress(),
81-
comment = "",
82-
skip_empty_rows = TRUE
83-
) {
84-
lifecycle::deprecate_soft("2.0.0", "read_table2()", "read_table()")
85-
read_table(
86-
file = file,
87-
col_names = col_names,
88-
col_types = col_types,
89-
locale = locale,
90-
na = na,
91-
skip = skip,
92-
n_max = n_max,
93-
guess_max = guess_max,
94-
progress = progress,
95-
comment = comment,
96-
skip_empty_rows = skip_empty_rows
97-
)
98-
}
99-
10061
#' @rdname spec_delim
10162
#' @export
10263
spec_table <- generate_spec_fun(read_table)

man/read_table2.Rd

Lines changed: 0 additions & 28 deletions
This file was deleted.

tests/testthat/test-read-table.R

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ test_that("read_table can read a truncated file without crashing (740)", {
3030
)
3131
})
3232

33-
# read_table2 -------------------------------------------------------------------
34-
3533
test_that("read_table silently reads ragged columns", {
3634
x <- read_table("foo bar\n1 2\n3 4\n5 6\n")
3735
expect_equal(x$foo, c(1, 3, 5))

0 commit comments

Comments
 (0)