knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
Welcome to exploreR! This is a small package that will provide very useful summaries of your data frame. It is best used before your exploratory data analysis. The package is composed of three functions. The instructions below will explain the use and the specific output based on the data frame input provided for the function.
First, load the package.
library(exploreR)
You can use this toy data frame to see how the functions work.
toy_data <- data.frame("letters" = c("a", "b", NA, "d"), "numbers" = c(1, 4, 6, NA), "logical" = c(NA, FALSE, NA, TRUE), "dates" = as.Date(c("2003-01-02", "2002-02-02", "2004-03-03", "2005-04-04")), "integers" = c(2L, 3L, 4L, 5L), stringsAsFactors = FALSE)
This function will take in one argument (a data frame) and return a data frame. Using our toy_data
example, variable_summary()
returns the following data frame.
variable_summary(toy_data)
This function takes in the single data frame argument and returns the amount of empty cells and a percentage of empty cells compared to the length of the column. Again using our toy_data
example, missing_values()
returns the following data frame.
missing_values(toy_data)
This function will take in one argument (a data frame) and will provide a short summary of the data frame. Again using our toy_data
example, size()
returns the following data frame.
size(toy_data)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.