Understanding data with skimr
As an R programmer, the skimr
package is a useful tool for providing summary statistics about variables that can come in a variety of forms such as data frames and vectors. The package provides a larger set of statistics in order to give the end user a more robust set of information as compared to the base R summary()
function.
To use the skimr
package, it must first be installed from CRAN
using the install.packages("skimr")
command. Once installed, the package can be loaded using the library(skimr)
command. The skim()
function is then used to summarize a whole dataset. For example, skim(iris)
would provide summary statistics for the iris
dataset. The output of skim()
is printed horizontally, with one section per variable type and one row per variable.
The package also provides the skim_to_wide()
function, which converts the output of skim()
to a wide format. This can be useful for exporting the summary statistics to a spreadsheet or other...