cqq_scatter_1: A scatter plot of two quantitative and one categorical...

Description Usage Arguments Examples

Description

A scatter plot that explores the relationship of two quantitave variables that are subdivided into 3-10 categories. Applies linear regression significance tests within categories and on category means. 95% bootstrapped cofidence intervals of variable means are displayed on the plot.

Usage

1
2
3
cqq_scatter_1(data, cat_1, quant_1, quant_2, x_label = quant_1,
  y_label = quant_2, title = paste(quant_1, "vs", quant_2, "by", cat_1),
  text_size = 1)

Arguments

data

(data.frame) The data that will be plotted. Must have at least two numeric columns and one factor column, preferably ordered.

cat_1

(character, length == 1) The name of column in data that stores the categorical variable. This column should be a factor, preferably ordered, with 3 to 10 levels.

quant_1

(character, length == 1) The name of column in data that stores the quantative that will plotted on the x-axis.

quant_2

(character, length == 1) The name of column in data that stores the quantative that will plotted on the y-axis.

x_label

(character, length == 1) The label of the x-axis

y_label

(character, length == 1) The label of the y-axis

title

(character, length == 1) The tile of the graph

text_size

(numeric, length == 1) A multiplicative scaling of all text size. For, example, 1 is standard size and 2 is twice as large. This is useful for exporting graphs of various sizes, since text size does not automatically scale with export size.

Examples

1
2
# Plot sepal width vs sepal length for three species of iris:
cqq_scatter_1(data = iris, cat_1 = "Species", quant_1 = "Sepal.Width", quant_2 = "Sepal.Length")

zachary-foster/quickplots documentation built on May 4, 2019, 8:48 p.m.