Skip to content

Commit

Permalink
use read_table2 to read whitespace-delimited text; fixes #1661
Browse files Browse the repository at this point in the history
read_table requires columns to be aligned, but many real-world
whitespace-delimited data files do not have aligned columns.
read_table2, new in readr 1.1.0, does not require columns to be aligned
but otherwise behaves similarly to read_table.
  • Loading branch information
jmcphers committed Dec 2, 2017
1 parent d43cbc8 commit 560aeb2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/cpp/session/modules/SessionDataImportV2.R
Expand Up @@ -406,8 +406,8 @@
}
else if (identical(dataImportOptions$delimiter, " "))
{
functionName <- "read_table"
functionReference <- readr::read_table
functionName <- "read_table2"
functionReference <- readr::read_table2
}
else
{
Expand Down
Expand Up @@ -384,7 +384,7 @@ public void execute(Boolean succeeded)
private ArrayList<Dependency> dataImportCsvDependencies()
{
ArrayList<Dependency> deps = new ArrayList<Dependency>();
deps.add(Dependency.cranPackage("readr", "0.2.2"));
deps.add(Dependency.cranPackage("readr", "1.1.0"));
deps.add(Dependency.cranPackage("Rcpp", "0.11.5"));
return deps;
}
Expand Down

0 comments on commit 560aeb2

Please sign in to comment.