visualise_variables_xx: Visualise each Variable Pair in a given Dataset

Description Usage Arguments Value See Also Examples

Description

Plots an appropriate visualisations for two attributes in a given dataset. This function utilises ggplot2 to design and plot the Visualisations. Plots a scatterplot for two numeric variables. Plots a bar chart for two factor variables. Plots a boxplot for one numeric variable and one categorical variable. The plots can be standardised, whereby the values lie on the interval 0 to 1. By default, regular plots are visualised. There is also an option to click through the points one by one, or print them all simultaneously. The plots are outputed as a list. The plots can also be saved to a specified directory as pdfs. Note, that it is crucial that the variables are correctly defined as either numeric or categorical.

Usage

1
2
visualise_variables_xx(dataset, y_index = NULL, y_name = NULL,
  click = TRUE, standardise = FALSE, directory = NULL)

Arguments

dataset

The dataset to be visualised. Note, appropriate data types must be defined for the columns.

y_index

An integer value, indicating the column index of the response variable, the default is NULL.

y_name

A character value, indicating the column name of the response variable, the default is NULL.

click

A boolean value, indicating whether to click through the plots one by one, default is True,

standardise

A logical value, indicating whether the axises should be standardised to the interval 0 to 1, the default is False.

directory

A character object specifying the directory where the data frame is to be saved as a .pdf file.

Value

Outputs a variety of bar charts, histograms and bar charts.

See Also

visualise_qqplot, visualise_residuals, visualise_variables_x

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#-- Example 1: LungCap Data --#

# Regular Visualisations of the data frame
visualise_variables_xx(dataset = lungcap, click = TRUE)

Regular visualistions of the data using y_name
visualise_variables_xx(dataset = lungcap, y_name = 'Gender')

# Standardised Visualtions of the dataset
visualise_variables_xx(dataset = lungcap, standardise = TRUE, click = FALSE)

# Standardised Visualisations of the data frame using y_index
visualise_variables_xx(dataset = lungcap, standardise = TRUE, y_index = 1)

#-- Example 2: Titanic Data --#

# Regular Visualisations with click option
visualise_variables_xx(dataset = titanic, click = TRUE)

Regular visualistions of the data using y_name
visualise_variables_xx(dataset = titanic, y_name = 'Gender', click = TRUE)

# Standardised Visualtions of the dataset
visualise_variables_xx(dataset = titanic, standardise = TRUE, click = FALSE)

visualise_variables_xx(dataset = titanic, standardise = TRUE, y_index = 1)

oislen/BuenaVista documentation built on May 16, 2019, 8:12 p.m.