Skip to content

Commit

Permalink
Replace deprecated read_table2 with read_table
Browse files Browse the repository at this point in the history
  • Loading branch information
bodkan committed May 8, 2024
1 parent 08672e3 commit 5fe1b3a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion R/io.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ read_ind <- function(data) {
#'
#' @export
read_snp <- function(data, exclude = FALSE) {
readr::read_table2(
readr::read_table(
ifelse(exclude, data$exclude, data$snp),
col_names = c("id", "chrom", "gen", "pos", "ref", "alt"),
col_types = "ccdicc",
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/helper-functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ read_pops <- function(filename, columns) {
}

read_snp_file <- function(path) {
readr::read_table2(
readr::read_table(
path,
col_types = "ccdicc",
col_names = c("id", "chrom", "gen", "pos", "ref", "alt")
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-io.R
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ test_that("read_snp and write_snp are inverse functions", {
new_file <- tempfile()
write_snp(true, new_file)

new <- readr::read_table2(
new <- readr::read_table(
new_file,
col_types = "ccdicc",
col_names = c("id", "chrom", "gen", "pos", "ref", "alt")
Expand Down

0 comments on commit 5fe1b3a

Please sign in to comment.