10.28 Effect on Data Storage
20180721 When the names of the variables within a dataset
are changed R does not make a complete new copy of the
dataset. Instead, the actual data in the column remains in tack whilst
the variable itself (ds
) references a new memory location
where the new variable names get noted. The underlying data within the
table is unaffected.
::ref(weather) lobstr
## █ [1:0x558f7a1f0090] <tibble[,24]>
## ├─Date=[2:0x558f742b6710] <date>
## ├─Location=[3:0x558f77889f40] <chr>
## ├─MinTemp=[4:0x558f75afd850] <dbl>
## ├─MaxTemp=[5:0x558f7513fb70] <dbl>
## ├─Rainfall=[6:0x558f760e4c40] <dbl>
## ├─Evaporation=[7:0x558f71000a60] <dbl>
## ├─Sunshine=[8:0x558f77c66f30] <dbl>
## ├─WindGustDir=[9:0x558f75268b70] <ord>
## ├─WindGustSpeed=[10:0x558f7a50f5c0] <dbl>
## ├─WindDir9am=[11:0x558f75269160] <ord>
## ├─WindDir3pm=[12:0x558f757fa7d0] <ord>
## ├─WindSpeed9am=[13:0x558f74236290] <dbl>
## ├─WindSpeed3pm=[14:0x558f7719a310] <dbl>
## ├─Humidity9am=[15:0x558f757fadc0] <int>
## ├─Humidity3pm=[16:0x558f7795fdb0] <int>
## ├─Pressure9am=[17:0x558f77afded0] <dbl>
## ├─Pressure3pm=[18:0x558f7650faa0] <dbl>
## ├─Cloud9am=[19:0x558f779603a0] <int>
## ├─Cloud3pm=[20:0x558f77179e10] <int>
## ├─Temp9am=[21:0x558f76f8bc30] <dbl>
## ├─Temp3pm=[22:0x558f6fc7c710] <dbl>
## ├─RainToday=[23:0x558f7717a400] <fct>
## ├─RISK_MM=[24:0x558f76f57fb0] <dbl>
## └─RainTomorrow=[25:0x558f75c276b0] <fct>
::ref(ds) lobstr
## █ [1:0x558f7ad2fe00] <tibble[,24]>
## ├─date=[2:0x558f70e23a20] <date>
## ├─location=[3:0x558f71826a60] <chr>
## ├─min_temp=[4:0x558f73365a70] <dbl>
## ├─max_temp=[5:0x558f736c32a0] <dbl>
## ├─rainfall=[6:0x558f7381c630] <dbl>
## ├─evaporation=[7:0x558f72f87b00] <dbl>
## ├─sunshine=[8:0x558f730e0e90] <dbl>
## ├─wind_gust_dir=[9:0x558f73575c80] <ord>
## ├─wind_gust_speed=[10:0x558f72b1aa00] <dbl>
## ├─wind_dir_9am=[11:0x558f734bee00] <ord>
## ├─wind_dir_3pm=[12:0x558f739a83a0] <ord>
## ├─wind_speed_9am=[13:0x558f72c73d90] <dbl>
## ├─wind_speed_3pm=[14:0x558f727bad40] <dbl>
## ├─humidity_9am=[15:0x558f71aa5bc0] <int>
## ├─humidity_3pm=[16:0x558f729140d0] <int>
## ├─pressure_9am=[17:0x558f7476ee70] <dbl>
## ├─pressure_3pm=[18:0x558f748c8200] <dbl>
## ├─cloud_9am=[19:0x558f729c0ac0] <int>
## ├─cloud_3pm=[20:0x558f74a21590] <int>
## ├─temp_9am=[21:0x558f74acdf80] <dbl>
## ├─temp_3pm=[22:0x558f74c27310] <dbl>
## ├─rain_today=[23:0x558f74d806a0] <fct>
## ├─risk_mm=[24:0x558f74e2d090] <dbl>
## └─rain_tomorrow=[25:0x558f74f86420] <fct>
Your donation will support ongoing availability and give you access to the PDF version of this book. Desktop Survival Guides include Data Science, GNU/Linux, and MLHub. Books available on Amazon include Data Mining with Rattle and Essentials of Data Science. Popular open source software includes rattle, wajig, and mlhub. Hosted by Togaware, a pioneer of free and open source software since 1984. Copyright © 1995-2022 Graham.Williams@togaware.com Creative Commons Attribution-ShareAlike 4.0
