general_barplot: Generate Bar Plots for Dataset Analysis

Description Usage Arguments Details Examples

View source: R/general_barplot.R

Description

This method generates bar plots for the nominal and ordinal variables of a given dataset to visualize their value distributions.

Usage

1
2
general_barplot(data = data_train, data_cols = c(iowa.houses.nominal.vars,
  iowa.houses.ordinal.vars), name = "barplots", pdf = T)

Arguments

data

data.frame containing the data for which the bar plots should be created.

data_cols

vector of column names containing nominal and ordinal data (for which the bar plots should be generated).

name

character string that is used as the filename.

pdf

boolean switch to either export the graphics to a PDF file or print them on screen. Defaults to TRUE.

Details

This method is used to visualize the distribution of nominal and ordinal features in a given dataset data. As not automated detection of these features is conducted, the columns containing such data are given by the data_cols parameter. For each of the features a bar plot is created via the create_barplot method. If the pdf switch is activated (switch == TRUE) the bar plots will be exported to a PDF file. Here the filename is determined by the name attribute. Each PDF page will then contain up to two bar plots. Otherwise the bar plots will be shown on the screen.

Examples

1
2
3
4
5
 # Create vectors containing the column names of columns with oridinal or
 # nominal features.
 KaggleHouse:::data.generate_data_views()
 # Generate PDF bar plots.
 KaggleHouse:::general_barplot()

MarcoNiemann/kaggle_house documentation built on May 7, 2019, 2:50 p.m.