Closed joaofgoncalves closed 2 years ago
Smaller reprex:
library(dplyr, warn.conflicts = FALSE)
library(dtplyr)
df <- lazy_dt(tibble(x = 1:3))
df %>%
arrange(desc(.data$x))
#> Error: Can't subset `.data` outside of a data mask context.
@joaofgoncalves - all fixed, thanks for catching this.
# devtools::install_github("tidyverse/dtplyr")
library(dplyr, warn.conflicts = FALSE)
library(dtplyr)
df <- lazy_dt(tibble(x = 1:3))
df %>%
arrange(desc(.data$x))
#> Source: local data table [3 x 1]
#> Call: `_DT1`[order(-x)]
#>
#> x
#> <int>
#> 1 3
#> 2 2
#> 3 1
#>
#> # Use as.data.table()/as.data.frame()/as_tibble() to access results
Hello, I came across some potentially strange behaviour of arrange when using the desc function with the .data pronoun. The line below is throwing the following error: "Error: Can't subset
.data
outside of a data mask context."If desc() is not used within arrange() it works fine with the .data pronoun. Also, this issue only happens when using dtplyr but is working fine with dplyr. Here is a reproducible example:
Session info follows below:
Thanks in advance!