[Deprecated]

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()` was deprecated in dplyr 1.0.0. #> Please use `lobst::ref()` instead.
#> <0x562649b3f1b8> #> Variables: #> * mpg: <0x56264838b8c0> #> * cyl: <0x562644711f80> #> * disp: <0x5626441ce5d0> #> * hp: <0x5626492f7e20> #> * drat: <0x5626484eb850> #> * wt: <0x56264c020380> #> * qsec: <0x56264bc69300> #> * vs: <0x562645f96ce0> #> * am: <0x562649f55c50> #> * gear: <0x56264402e3a0> #> * carb: <0x56264bc51210> #> Attributes: #> * names: <0x562649b3f268> #> * row.names: <0x56264a02ef30> #> * class: <0x56264ba32650>
# -> lobstr::ref(mtcars)
#> [1:0x562649b3f1b8] <df[,11]> #> ├─mpg = [2:0x56264838b8c0] <dbl> #> ├─cyl = [3:0x562644711f80] <dbl> #> ├─disp = [4:0x5626441ce5d0] <dbl> #> ├─hp = [5:0x5626492f7e20] <dbl> #> ├─drat = [6:0x5626484eb850] <dbl> #> ├─wt = [7:0x56264c020380] <dbl> #> ├─qsec = [8:0x56264bc69300] <dbl> #> ├─vs = [9:0x562645f96ce0] <dbl> #> ├─am = [10:0x562649f55c50] <dbl> #> ├─gear = [11:0x56264402e3a0] <dbl> #> └─carb = [12:0x56264bc51210] <dbl>
mtcars2 <- mutate(mtcars, cyl2 = cyl * 2) # -> lobstr::ref(mtcars2)
#> [1:0x56264f7ee7d8] <df[,12]> #> ├─mpg = [2:0x56264838b8c0] <dbl> #> ├─cyl = [3:0x562644711f80] <dbl> #> ├─disp = [4:0x5626441ce5d0] <dbl> #> ├─hp = [5:0x5626492f7e20] <dbl> #> ├─drat = [6:0x5626484eb850] <dbl> #> ├─wt = [7:0x56264c020380] <dbl> #> ├─qsec = [8:0x56264bc69300] <dbl> #> ├─vs = [9:0x562645f96ce0] <dbl> #> ├─am = [10:0x562649f55c50] <dbl> #> ├─gear = [11:0x56264402e3a0] <dbl> #> ├─carb = [12:0x56264bc51210] <dbl> #> └─cyl2 = [13:0x56264eb956e0] <dbl>
changes(mtcars, mtcars2)
#> Warning: `changes()` was deprecated in dplyr 1.0.0. #> Please use `lobstr::ref()` instead.
#> Changed variables: #> old new #> cyl2 <added> 0x56264eb956e0 #> #> Changed attributes: #> old new #> names 0x562649b3f268 0x56264f7ee0f8
# -> lobstr::ref(mtcars, mtcars2)
#> [1:0x562649b3f1b8] <df[,11]> #> ├─mpg = [2:0x56264838b8c0] <dbl> #> ├─cyl = [3:0x562644711f80] <dbl> #> ├─disp = [4:0x5626441ce5d0] <dbl> #> ├─hp = [5:0x5626492f7e20] <dbl> #> ├─drat = [6:0x5626484eb850] <dbl> #> ├─wt = [7:0x56264c020380] <dbl> #> ├─qsec = [8:0x56264bc69300] <dbl> #> ├─vs = [9:0x562645f96ce0] <dbl> #> ├─am = [10:0x562649f55c50] <dbl> #> ├─gear = [11:0x56264402e3a0] <dbl> #> └─carb = [12:0x56264bc51210] <dbl> #> #> [13:0x56264f7ee7d8] <df[,12]> #> ├─mpg = [2:0x56264838b8c0] #> ├─cyl = [3:0x562644711f80] #> ├─disp = [4:0x5626441ce5d0] #> ├─hp = [5:0x5626492f7e20] #> ├─drat = [6:0x5626484eb850] #> ├─wt = [7:0x56264c020380] #> ├─qsec = [8:0x56264bc69300] #> ├─vs = [9:0x562645f96ce0] #> ├─am = [10:0x562649f55c50] #> ├─gear = [11:0x56264402e3a0] #> ├─carb = [12:0x56264bc51210] #> └─cyl2 = [14:0x56264eb956e0] <dbl>