diff --git a/R/io.R b/R/io.R index 9e8e6b9..c576e4f 100644 --- a/R/io.R +++ b/R/io.R @@ -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", diff --git a/tests/testthat/helper-functions.R b/tests/testthat/helper-functions.R index 2c1fb84..45b9174 100644 --- a/tests/testthat/helper-functions.R +++ b/tests/testthat/helper-functions.R @@ -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") diff --git a/tests/testthat/test-io.R b/tests/testthat/test-io.R index d6b8cf9..3f12b82 100644 --- a/tests/testthat/test-io.R +++ b/tests/testthat/test-io.R @@ -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")