knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

expldata

Travis build status AppVeyor build status Codecov test coverage =======

This package provides easy to use functions that can be used to perform initial exploratory data analysis. Instead of using multiple functions from multiple packages, this package allows a single command to perform and display beneficial data information, allowing the user to plan any necessary transformations and corrections prior to selecting the most appropriate model and or technique. .

Installation

You can install the released version of expldata from CRAN with:

install.packages("expldata")

And the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("ckornafel/MSDS696-EDAPackage")

EDA / multiplot

The EDA function is the multi-purpose tool of this package which is the main function of the package. EDA will perform every test contained in the package and display the results to the screen in an easy to read table. Additionally, if the plots parameter is set to TRUE, the function will return a list of ggplot2 density plots. An additional feature is that the function will determine if there is a single factor variable and assume that it is the dependent variable. This assumption will adjust the density plots to group and color code each of the factor levels for each plot. The plots can be displayed using the multiplot function also included in the package.

library(expldata)
library(huxtable)

Create Example DataFrame

set.seed(100)
example_df <- data.frame(replicate(5,sample(0:10, 10, replace = TRUE)))
example_df$X10 <- as.factor(c(TRUE, FALSE, FALSE, TRUE, TRUE, FALSE, FALSE, TRUE, TRUE, FALSE))
example_df$X11 <- c("a","b","c","d","a","b","c","d","a","b")
colnames(example_df)<- c("Num1","Num2","Num3","Num4","Num5","Fact1","Char1")
str(example_df)
examplePlots <- EDA(example_df, plots = TRUE)

Multiplot

The multiplot function is one that was adapted from Winston Chang in his R Graphics Cookbook (http://www.cookbook-r.com/Graphs/Multiple_graphs_on_one_page_(ggplot2)/). This function will print several plots stored in a list and display them to the viewer. The multiplot function can also accept addition grid parameters if the user would like to customize the displayed output.

Multiplot(plotlist = examplePlots[1]) #Displaying the first  plot from the list generated in the above example
Multiplot(plotlist = examplePlots[2:3]) #Displating second and third plot


ckornafel/expldata documentation built on Dec. 27, 2019, 2:20 a.m.