You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Despite specifying immutable=TRUE in lazy_dt, if I have a mutate followed by a summarize followed by a mutate, the first mutate will get applied to the input data.table object, when it should not be modified. I can't seem to trigger it unless I have a mutate after the summarize.
library(data.table)
library(dtplyr)
library(dplyr)
#> #> Attaching package: 'dplyr'#> The following objects are masked from 'package:data.table':#> #> between, first, last#> The following objects are masked from 'package:stats':#> #> filter, lag#> The following objects are masked from 'package:base':#> #> intersect, setdiff, setequal, uniond1= data.table(x=c(1,1,1,2,2,2), y=c(1,2,3,4,5,6))
d2= lazy_dt(d1, immutable=TRUE) %>%
mutate(
y=-y,
z=x+y
) %>%
summarize(
mean_y= mean(y),
mean_z= mean(z)
) %>%
mutate(
sum_mean=mean_y+mean_z
) %>%
as.data.table()
d1#> x y z#> 1: 1 -1 0#> 2: 1 -2 -1#> 3: 1 -3 -2#> 4: 2 -4 -2#> 5: 2 -5 -3#> 6: 2 -6 -4
Despite specifying
immutable=TRUE
inlazy_dt
, if I have amutate
followed by asummarize
followed by amutate
, the firstmutate
will get applied to the input data.table object, when it should not be modified. I can't seem to trigger it unless I have amutate
after thesummarize
.Here's my
sessionInfo()
:The text was updated successfully, but these errors were encountered: