Deprecated lifecycle

This is useful for understand how and when dplyr makes copies of data frames

location(df)

changes(x, y)

Arguments

df

a data frame

x, y

two data frames to compare

Examples

location(mtcars)
#> Warning: `location()` is deprecated as of dplyr 1.0.0. #> Please use `lobst::ref()` instead. #> This warning is displayed once every 8 hours. #> Call `lifecycle::last_warnings()` to see where this warning was generated.
#> <0x5627efd972b8> #> Variables: #> * mpg: <0x5627ed220690> #> * cyl: <0x5627ed362f70> #> * disp: <0x5627eb8c2940> #> * hp: <0x5627ebe6e3d0> #> * drat: <0x5627ed1aaef0> #> * wt: <0x5627e91c6b40> #> * qsec: <0x5627ed389c90> #> * vs: <0x5627ed389dd0> #> * am: <0x5627ebabf9d0> #> * gear: <0x5627ebabfb10> #> * carb: <0x5627e93bfd70> #> Attributes: #> * names: <0x5627efd97208> #> * row.names: <0x5627e93bfeb0> #> * class: <0x5627eedb35c8>
# -> lobstr::ref(mtcars)
#> [1:0x5627efd972b8] <df[,11]> #> ├─mpg = [2:0x5627ed220690] <dbl> #> ├─cyl = [3:0x5627ed362f70] <dbl> #> ├─disp = [4:0x5627eb8c2940] <dbl> #> ├─hp = [5:0x5627ebe6e3d0] <dbl> #> ├─drat = [6:0x5627ed1aaef0] <dbl> #> ├─wt = [7:0x5627e91c6b40] <dbl> #> ├─qsec = [8:0x5627ed389c90] <dbl> #> ├─vs = [9:0x5627ed389dd0] <dbl> #> ├─am = [10:0x5627ebabf9d0] <dbl> #> ├─gear = [11:0x5627ebabfb10] <dbl> #> └─carb = [12:0x5627e93bfd70] <dbl>
mtcars2 <- mutate(mtcars, cyl2 = cyl * 2) # -> lobstr::ref(mtcars2)
#> [1:0x5627ebee7ba8] <df[,12]> #> ├─mpg = [2:0x5627ed220690] <dbl> #> ├─cyl = [3:0x5627ed362f70] <dbl> #> ├─disp = [4:0x5627eb8c2940] <dbl> #> ├─hp = [5:0x5627ebe6e3d0] <dbl> #> ├─drat = [6:0x5627ed1aaef0] <dbl> #> ├─wt = [7:0x5627e91c6b40] <dbl> #> ├─qsec = [8:0x5627ed389c90] <dbl> #> ├─vs = [9:0x5627ed389dd0] <dbl> #> ├─am = [10:0x5627ebabf9d0] <dbl> #> ├─gear = [11:0x5627ebabfb10] <dbl> #> ├─carb = [12:0x5627e93bfd70] <dbl> #> └─cyl2 = [13:0x5627ef13f920] <dbl>
changes(mtcars, mtcars2)
#> Warning: `changes()` is deprecated as of dplyr 1.0.0. #> Please use `lobstr::ref()` instead. #> This warning is displayed once every 8 hours. #> Call `lifecycle::last_warnings()` to see where this warning was generated.
#> Changed variables: #> old new #> cyl2 <added> 0x5627ef13f920 #> #> Changed attributes: #> old new #> names 0x5627efd97208 0x5627ebec5428 #> row.names 0x5627e93bfeb0 0x5627e99a0cc0
# -> lobstr::ref(mtcars, mtcars2)
#> [1:0x5627efd972b8] <df[,11]> #> ├─mpg = [2:0x5627ed220690] <dbl> #> ├─cyl = [3:0x5627ed362f70] <dbl> #> ├─disp = [4:0x5627eb8c2940] <dbl> #> ├─hp = [5:0x5627ebe6e3d0] <dbl> #> ├─drat = [6:0x5627ed1aaef0] <dbl> #> ├─wt = [7:0x5627e91c6b40] <dbl> #> ├─qsec = [8:0x5627ed389c90] <dbl> #> ├─vs = [9:0x5627ed389dd0] <dbl> #> ├─am = [10:0x5627ebabf9d0] <dbl> #> ├─gear = [11:0x5627ebabfb10] <dbl> #> └─carb = [12:0x5627e93bfd70] <dbl> #> #> [13:0x5627ebee7ba8] <df[,12]> #> ├─mpg = [2:0x5627ed220690] #> ├─cyl = [3:0x5627ed362f70] #> ├─disp = [4:0x5627eb8c2940] #> ├─hp = [5:0x5627ebe6e3d0] #> ├─drat = [6:0x5627ed1aaef0] #> ├─wt = [7:0x5627e91c6b40] #> ├─qsec = [8:0x5627ed389c90] #> ├─vs = [9:0x5627ed389dd0] #> ├─am = [10:0x5627ebabf9d0] #> ├─gear = [11:0x5627ebabfb10] #> ├─carb = [12:0x5627e93bfd70] #> └─cyl2 = [14:0x5627ef13f920] <dbl>