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.
#> <0x5561402f1a78> #> Variables: #> * mpg: <0x55613b6e49c0> #> * cyl: <0x55613b43c800> #> * disp: <0x55613a9ee570> #> * hp: <0x55613d51c260> #> * drat: <0x55613c9bbcc0> #> * wt: <0x55613ecad1d0> #> * qsec: <0x55613f739040> #> * vs: <0x55613b552e40> #> * am: <0x55613b174d90> #> * gear: <0x5561404813c0> #> * carb: <0x55613e536150> #> Attributes: #> * names: <0x5561402f1bd8> #> * row.names: <0x556140811c50> #> * class: <0x5561448c89e8>
# -> lobstr::ref(mtcars)
#> [1:0x5561402f1a78] <df[,11]> #> ├─mpg = [2:0x55613b6e49c0] <dbl> #> ├─cyl = [3:0x55613b43c800] <dbl> #> ├─disp = [4:0x55613a9ee570] <dbl> #> ├─hp = [5:0x55613d51c260] <dbl> #> ├─drat = [6:0x55613c9bbcc0] <dbl> #> ├─wt = [7:0x55613ecad1d0] <dbl> #> ├─qsec = [8:0x55613f739040] <dbl> #> ├─vs = [9:0x55613b552e40] <dbl> #> ├─am = [10:0x55613b174d90] <dbl> #> ├─gear = [11:0x5561404813c0] <dbl> #> └─carb = [12:0x55613e536150] <dbl>
mtcars2 <- mutate(mtcars, cyl2 = cyl * 2) # -> lobstr::ref(mtcars2)
#> [1:0x55614596f5d8] <df[,12]> #> ├─mpg = [2:0x55613b6e49c0] <dbl> #> ├─cyl = [3:0x55613b43c800] <dbl> #> ├─disp = [4:0x55613a9ee570] <dbl> #> ├─hp = [5:0x55613d51c260] <dbl> #> ├─drat = [6:0x55613c9bbcc0] <dbl> #> ├─wt = [7:0x55613ecad1d0] <dbl> #> ├─qsec = [8:0x55613f739040] <dbl> #> ├─vs = [9:0x55613b552e40] <dbl> #> ├─am = [10:0x55613b174d90] <dbl> #> ├─gear = [11:0x5561404813c0] <dbl> #> ├─carb = [12:0x55613e536150] <dbl> #> └─cyl2 = [13:0x556141ed0f70] <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> 0x556141ed0f70 #> #> Changed attributes: #> old new #> names 0x5561402f1bd8 0x55614596f318 #> row.names 0x556140811c50 0x5561456e96a0
# -> lobstr::ref(mtcars, mtcars2)
#> [1:0x5561402f1a78] <df[,11]> #> ├─mpg = [2:0x55613b6e49c0] <dbl> #> ├─cyl = [3:0x55613b43c800] <dbl> #> ├─disp = [4:0x55613a9ee570] <dbl> #> ├─hp = [5:0x55613d51c260] <dbl> #> ├─drat = [6:0x55613c9bbcc0] <dbl> #> ├─wt = [7:0x55613ecad1d0] <dbl> #> ├─qsec = [8:0x55613f739040] <dbl> #> ├─vs = [9:0x55613b552e40] <dbl> #> ├─am = [10:0x55613b174d90] <dbl> #> ├─gear = [11:0x5561404813c0] <dbl> #> └─carb = [12:0x55613e536150] <dbl> #> #> [13:0x55614596f5d8] <df[,12]> #> ├─mpg = [2:0x55613b6e49c0] #> ├─cyl = [3:0x55613b43c800] #> ├─disp = [4:0x55613a9ee570] #> ├─hp = [5:0x55613d51c260] #> ├─drat = [6:0x55613c9bbcc0] #> ├─wt = [7:0x55613ecad1d0] #> ├─qsec = [8:0x55613f739040] #> ├─vs = [9:0x55613b552e40] #> ├─am = [10:0x55613b174d90] #> ├─gear = [11:0x5561404813c0] #> ├─carb = [12:0x55613e536150] #> └─cyl2 = [14:0x556141ed0f70] <dbl>