[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.
#> <0x7fb5501827e8> #> Variables: #> * mpg: <0x7fb54a5d4d60> #> * cyl: <0x7fb54c7595b0> #> * disp: <0x7fb54c751e20> #> * hp: <0x7fb54c768ad0> #> * drat: <0x7fb54c758f30> #> * wt: <0x7fb54c7053b0> #> * qsec: <0x7fb54a56c550> #> * vs: <0x7fb54c711840> #> * am: <0x7fb54c75ef00> #> * gear: <0x7fb54c706c30> #> * carb: <0x7fb54a5bc9b0> #> Attributes: #> * names: <0x7fb550181e48> #> * row.names: <0x7fb54a5df6a0> #> * class: <0x7fb549e5a770>
# -> lobstr::ref(mtcars)
#> [1:0x7fb5501827e8] <df[,11]> #> ├─mpg = [2:0x7fb54a5d4d60] <dbl> #> ├─cyl = [3:0x7fb54c7595b0] <dbl> #> ├─disp = [4:0x7fb54c751e20] <dbl> #> ├─hp = [5:0x7fb54c768ad0] <dbl> #> ├─drat = [6:0x7fb54c758f30] <dbl> #> ├─wt = [7:0x7fb54c7053b0] <dbl> #> ├─qsec = [8:0x7fb54a56c550] <dbl> #> ├─vs = [9:0x7fb54c711840] <dbl> #> ├─am = [10:0x7fb54c75ef00] <dbl> #> ├─gear = [11:0x7fb54c706c30] <dbl> #> └─carb = [12:0x7fb54a5bc9b0] <dbl>
mtcars2 <- mutate(mtcars, cyl2 = cyl * 2) # -> lobstr::ref(mtcars2)
#> [1:0x7fb54f3bcff8] <df[,12]> #> ├─mpg = [2:0x7fb54a5d4d60] <dbl> #> ├─cyl = [3:0x7fb54c7595b0] <dbl> #> ├─disp = [4:0x7fb54c751e20] <dbl> #> ├─hp = [5:0x7fb54c768ad0] <dbl> #> ├─drat = [6:0x7fb54c758f30] <dbl> #> ├─wt = [7:0x7fb54c7053b0] <dbl> #> ├─qsec = [8:0x7fb54a56c550] <dbl> #> ├─vs = [9:0x7fb54c711840] <dbl> #> ├─am = [10:0x7fb54c75ef00] <dbl> #> ├─gear = [11:0x7fb54c706c30] <dbl> #> ├─carb = [12:0x7fb54a5bc9b0] <dbl> #> └─cyl2 = [13:0x7fb54c26dcc0] <dbl>
changes(mtcars, mtcars2)
#> Warning: `changes()` was deprecated in dplyr 1.0.0. #> Please use `lobstr::ref()` instead.
#> Changed variables: #> old new #> cyl2 <added> 0x7fb54c26dcc0 #> #> Changed attributes: #> old new #> names 0x7fb550181e48 0x7fb54f3bc7b8
# -> lobstr::ref(mtcars, mtcars2)
#> [1:0x7fb5501827e8] <df[,11]> #> ├─mpg = [2:0x7fb54a5d4d60] <dbl> #> ├─cyl = [3:0x7fb54c7595b0] <dbl> #> ├─disp = [4:0x7fb54c751e20] <dbl> #> ├─hp = [5:0x7fb54c768ad0] <dbl> #> ├─drat = [6:0x7fb54c758f30] <dbl> #> ├─wt = [7:0x7fb54c7053b0] <dbl> #> ├─qsec = [8:0x7fb54a56c550] <dbl> #> ├─vs = [9:0x7fb54c711840] <dbl> #> ├─am = [10:0x7fb54c75ef00] <dbl> #> ├─gear = [11:0x7fb54c706c30] <dbl> #> └─carb = [12:0x7fb54a5bc9b0] <dbl> #> #> [13:0x7fb54f3bcff8] <df[,12]> #> ├─mpg = [2:0x7fb54a5d4d60] #> ├─cyl = [3:0x7fb54c7595b0] #> ├─disp = [4:0x7fb54c751e20] #> ├─hp = [5:0x7fb54c768ad0] #> ├─drat = [6:0x7fb54c758f30] #> ├─wt = [7:0x7fb54c7053b0] #> ├─qsec = [8:0x7fb54a56c550] #> ├─vs = [9:0x7fb54c711840] #> ├─am = [10:0x7fb54c75ef00] #> ├─gear = [11:0x7fb54c706c30] #> ├─carb = [12:0x7fb54a5bc9b0] #> └─cyl2 = [14:0x7fb54c26dcc0] <dbl>