-
Notifications
You must be signed in to change notification settings - Fork 286
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor should_show_types(); add tests
- Loading branch information
Showing
6 changed files
with
106 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# options(readr.show_col_spec) controls column specifications | ||
|
||
Code | ||
out <- read_csv(readr_example("mtcars.csv")) | ||
Message <readr_spec_message> | ||
-- Column specification -------------------------------------------------------- | ||
cols( | ||
mpg = col_double(), | ||
cyl = col_double(), | ||
disp = col_double(), | ||
hp = col_double(), | ||
drat = col_double(), | ||
wt = col_double(), | ||
qsec = col_double(), | ||
vs = col_double(), | ||
am = col_double(), | ||
gear = col_double(), | ||
carb = col_double() | ||
) | ||
|
||
# `show_col_types` controls column specification | ||
|
||
Code | ||
out <- read_csv(readr_example("mtcars.csv"), show_col_types = TRUE) | ||
Message <readr_spec_message> | ||
-- Column specification -------------------------------------------------------- | ||
cols( | ||
mpg = col_double(), | ||
cyl = col_double(), | ||
disp = col_double(), | ||
hp = col_double(), | ||
drat = col_double(), | ||
wt = col_double(), | ||
qsec = col_double(), | ||
vs = col_double(), | ||
am = col_double(), | ||
gear = col_double(), | ||
carb = col_double() | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# options(readr.show_col_spec) controls column specifications | ||
|
||
Code | ||
out <- read_csv(readr_example("mtcars.csv")) | ||
Message <vroom_dim_message> | ||
Rows: 32 Columns: 11 | ||
Message <vroom_spec_message> | ||
-- Column specification -------------------------------------------------------- | ||
Delimiter: "," | ||
dbl (11): mpg, cyl, disp, hp, drat, wt, qsec, vs, am, gear, carb | ||
i Use `spec()` to retrieve the full column specification for this data. | ||
i Specify the column types or set `show_col_types = FALSE` to quiet this message. | ||
|
||
# `show_col_types` controls column specification | ||
|
||
Code | ||
out <- read_csv(readr_example("mtcars.csv"), show_col_types = TRUE) | ||
Message <vroom_dim_message> | ||
Rows: 32 Columns: 11 | ||
Message <vroom_spec_message> | ||
-- Column specification -------------------------------------------------------- | ||
Delimiter: "," | ||
dbl (11): mpg, cyl, disp, hp, drat, wt, qsec, vs, am, gear, carb | ||
i Use `spec()` to retrieve the full column specification for this data. | ||
i Specify the column types or set `show_col_types = FALSE` to quiet this message. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
pre_test_options <- options( | ||
readr.show_col_types = FALSE, | ||
readr.show_progress = FALSE | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters