box_plot_variable: Box Plot Variable

Description Usage Arguments Details Value Examples

View source: R/plot_helper.R

Description

This function provides a box plot of a variable.

Usage

1
2
3
box_plot_variable(data = NULL, y.var = NULL, x.var = NULL,
  coloring = NULL, y.name = "", x.name = "", group.label = NULL,
  legend.name = "", legend.label = NULL)

Arguments

data

Data points to be plotted.

y.var

The variable to be plotted along the y-axis.

x.var

The variable to be plotted along the x-axis.

coloring

The colors for subgroups.

y.name

Name of the y variable in the plot.

x.name

Name of the x variable in the plot.

legend.name

Title of the legend.

legend.label

New labels for the legend (optional).

Details

It can be separated by scenes and controling factors.

Value

A table with session ids and durations.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
#Box plot without variable subgroupings
box_plot_variable(test,
                  y.var = "path_length",
                  x.var = "scene_name",
                  y.name = "Path Length",
                  x.name = "Scene",
                  group.label = c("Training","City"))
#Box plot with variable subgroupings
box_plot_variable(test,
                  y.var = "path_length",
                  x.var = "scene_name",
                  coloring = "sex",
                  y.name = "Path Length",
                  x.name = "Scene",
                  group.label = c("Training","City"),
                  legend.name = "Sex",
                  legend.label = c("TRUE"="Female", "FALSE"="Male"))

cog-ethz/evertools documentation built on April 1, 2020, 10:30 p.m.