10.33 Random Observations

20180721 It is also useful to review some random observations from the dataset to provide a little more insight. Here we use dplyr::sample_n() to randomly select six rows from the dataset.

# Review a random sample of observations.

sample_n(ds, size=6) %>% print.data.frame()
##         date      location min_temp max_temp rainfall evaporation sunshine
## 1 2011-08-08 NorfolkIsland     14.0     19.3      0.0         2.8      6.6
## 2 2010-03-28  PerthAirport     14.9     26.3      0.0         6.0     11.0
## 3 2020-10-19    Wollongong     14.3     18.6      6.2          NA       NA
## 4 2010-10-14       Mildura     12.3     24.2      5.0         1.4      4.3
## 5 2019-12-14        Hobart     10.8     18.7      0.4         4.8      5.8
## 6 2019-02-08      Watsonia     17.2     25.0      2.0         5.8      7.8
##   wind_gust_dir wind_gust_speed wind_dir_9am wind_dir_3pm wind_speed_9am
## 1            NE              50          ENE           NE             20
## 2           SSW              41           SE            S             20
## 3           SSW              39          SSW          SSE             24
....


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