-
Notifications
You must be signed in to change notification settings - Fork 65
Remove arrangements for older versions of R that vroom does not support #595
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 9 commits
dfbfe32
2bbc16e
87f9127
0d6d502
03a885d
30e5b13
5923fe0
b37cdc0
29de917
52fbc2a
c0cedce
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -479,9 +479,7 @@ vroom_tempfile <- function() { | |
| #' | ||
| #' Alternatively there is also a family of environment variables to control use of | ||
| #' the Altrep framework. These can then be set in your `.Renviron` file, e.g. | ||
| #' with `usethis::edit_r_environ()`. For versions of R where the Altrep | ||
| #' framework is unavailable (R < 3.5.0) they are automatically turned off and | ||
| #' the variables have no effect. The variables can take one of `true`, `false`, | ||
| #' with `usethis::edit_r_environ()`. The variables can take one of `true`, `false`, | ||
| #' `TRUE`, `FALSE`, `1`, or `0`. | ||
| #' | ||
| #' - `VROOM_USE_ALTREP_NUMERICS` - If set use Altrep for _all_ numeric types | ||
|
|
@@ -526,16 +524,16 @@ vroom_altrep <- function(which = NULL) { | |
| } | ||
|
|
||
| args <- list( | ||
| getRversion() >= "3.5.0" && which$chr %||% vroom_use_altrep_chr(), | ||
| getRversion() >= "3.5.0" && which$fct %||% vroom_use_altrep_fct(), | ||
| getRversion() >= "3.5.0" && which$int %||% vroom_use_altrep_int(), | ||
| getRversion() >= "3.5.0" && which$dbl %||% vroom_use_altrep_dbl(), | ||
| getRversion() >= "3.5.0" && which$num %||% vroom_use_altrep_num(), | ||
| getRversion() >= "3.6.0" && which$lgl %||% vroom_use_altrep_lgl(), # logicals only supported in R 3.6.0+ | ||
| getRversion() >= "3.5.0" && which$dttm %||% vroom_use_altrep_dttm(), | ||
| getRversion() >= "3.5.0" && which$date %||% vroom_use_altrep_date(), | ||
| getRversion() >= "3.5.0" && which$time %||% vroom_use_altrep_time(), | ||
| getRversion() >= "3.5.0" && which$big_int %||% vroom_use_altrep_big_int() | ||
| which$chr %||% vroom_use_altrep_chr(), | ||
| which$fct %||% vroom_use_altrep_fct(), | ||
| which$int %||% vroom_use_altrep_int(), | ||
| which$dbl %||% vroom_use_altrep_dbl(), | ||
| which$num %||% vroom_use_altrep_num(), | ||
| which$lgl %||% vroom_use_altrep_lgl(), | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. vroom actually does not ever use altrep for logical columns, but I gather there must have been some thought that it might one day? Anyway, I'm not getting into that here.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Probably the fact that it didn't exist in 3.5 delayed its implementation, and then it was never added later on?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah? But I also think the performance argument is so different (less compelling) for logical. I'd at least want to look into that quantitatively before ever considering adding that feature. |
||
| which$dttm %||% vroom_use_altrep_dttm(), | ||
| which$date %||% vroom_use_altrep_date(), | ||
| which$time %||% vroom_use_altrep_time(), | ||
| which$big_int %||% vroom_use_altrep_big_int() | ||
| ) | ||
|
|
||
| out <- 0L | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -213,13 +213,11 @@ will not need to be set by most users. | |
| - `VROOM_WRITE_BUFFER_LINES` - The number of lines to use for each | ||
| buffer when writing files (default: 1000). | ||
|
|
||
| There are also a family of variables to control use of the Altrep | ||
| framework. For versions of R where the Altrep framework is unavailable | ||
| (R \< 3.5.0) they are automatically turned off and the variables have no | ||
| effect. The variables can take one of `true`, `false`, `TRUE`, `FALSE`, | ||
| `1`, or `0`. | ||
| There is also a family of variables to control use of the Altrep | ||
| framework. These variables can take one of these values: `true`, | ||
| `false`, `TRUE`, `FALSE`, `1`, or `0`. | ||
|
|
||
| - `VROOM_USE_ALTREP_NUMERICS` - If set use Altrep for *all* numeric | ||
| - `VROOM_USE_ALTREP_NUMERICS` - If true, use Altrep for *all* numeric | ||
| types (default `false`). | ||
|
|
||
| There are also individual variables for each type. Currently only | ||
|
|
@@ -236,15 +234,6 @@ There are also individual variables for each type. Currently only | |
| - `VROOM_USE_ALTREP_DATE` | ||
| - `VROOM_USE_ALTREP_TIME` | ||
|
|
||
| ## RStudio caveats | ||
|
|
||
| RStudio’s environment pane calls `object.size()` when it refreshes the | ||
| pane, which for Altrep objects can be extremely slow. RStudio 1.2.1335+ | ||
| includes the fixes | ||
| ([RStudio#4210](https://github.com/rstudio/rstudio/pull/4210), | ||
| [RStudio#4292](https://github.com/rstudio/rstudio/pull/4292)) for this | ||
| issue, so it is recommended you use at least that version. | ||
|
|
||
|
Comment on lines
-239
to
-247
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This now feels like ancient history that need not be mentioned. |
||
| ## Thanks | ||
|
|
||
| - [Gabe Becker](https://github.com/gmbecker), [Luke | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.