10.26 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.

location(weather)
## Warning: `location()` was deprecated in dplyr 1.0.0.
## Please use `lobst::ref()` instead.
## This warning is displayed once every 8 hours.
## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was generated.
## <0x56066dbbd520>
## Variables:
##  * Date:          <0x56066d7b4d60>
##  * Location:      <0x560671306510>
##  * MinTemp:       <0x56066dbbc770>
##  * MaxTemp:       <0x56066f549010>
##  * Rainfall:      <0x56066da25480>
##  * Evaporation:   <0x560672c68360>
##  * Sunshine:      <0x56066d2d1d40>
##  * WindGustDir:   <0x560671f4efe0>
##  * WindGustSpeed: <0x560669009130>
##  * WindDir9am:    <0x560674935a10>
##  * WindDir3pm:    <0x56066f549bc0>
##  * WindSpeed9am:  <0x560664de8e70>
##  * WindSpeed3pm:  <0x5606753a5840>
##  * Humidity9am:   <0x56066da26030>
##  * Humidity3pm:   <0x5606713070c0>
##  * Pressure9am:   <0x5606661ce3a0>
##  * Pressure3pm:   <0x56066ad3ea50>
##  * Cloud9am:      <0x56066d2d28f0>
##  * Cloud3pm:      <0x560669009ce0>
##  * Temp9am:       <0x5606713b0bd0>
##  * Temp3pm:       <0x56067154ee60>
##  * RainToday:     <0x560672c68f10>
##  * RISK_MM:       <0x56067319fa30>
##  * RainTomorrow:  <0x560664de9a20>
## Attributes:
##  * names:         <0x560671acdbc0>
##  * row.names:     <0x56066dcf5218>
##  * class:         <0x56067357a2e8>
location(ds)
## <0x560671a27740>
## Variables:
##  * date:            <0x56066f36b0b0>
##  * location:        <0x56066ece5820>
##  * min_temp:        <0x56066beedda0>
##  * max_temp:        <0x56066f026430>
##  * rainfall:        <0x56066e529960>
##  * evaporation:     <0x56066e6ad9a0>
##  * sunshine:        <0x56066f72beb0>
##  * wind_gust_dir:   <0x56066c071de0>
##  * wind_gust_speed: <0x56066f8afef0>
##  * wind_dir_9am:    <0x56066eecbd50>
##  * wind_dir_3pm:    <0x56066e2dacb0>
##  * wind_speed_9am:  <0x56067012e100>
##  * wind_speed_3pm:  <0x5606702b2140>
##  * humidity_9am:    <0x560670436180>
##  * humidity_3pm:    <0x56066f54c6f0>
##  * pressure_9am:    <0x560670539450>
##  * pressure_3pm:    <0x5606706bd490>
##  * cloud_9am:       <0x56066f1aa470>
##  * cloud_3pm:       <0x56066e16e7c0>
##  * temp_9am:        <0x5606708414d0>
##  * temp_3pm:        <0x5606709c5510>
##  * rain_today:      <0x560670b49550>
##  * risk_mm:         <0x560670c0b590>
##  * rain_tomorrow:   <0x560670d8f5d0>
## Attributes:
##  * names:           <0x56067135f5c0>
##  * row.names:       <0x560678e00000>
##  * class:           <0x560670537588>


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-2021 Graham.Williams@togaware.com Creative Commons Attribution-ShareAlike 4.0