bplot: Plot bargraph

Description Usage Arguments Examples

View source: R/plot_functions.R

Description

This function will plot means in a bargraph for for 1 or 2 categorical variables.

Usage

1
bplot(data, x, y, group = NULL, e, xlab = NULL, ylab = NULL)

Arguments

data

A dataframe

x

The independent variable to be plotted on the x axis. Must be categorical.

y

The dependent variable to be plotted on the y axis.

group

A second grouping variable.

xlab

A title for the x-axis. If not defined, will return name of x variable.

ylab

A title for the y-axis. If not defined, will return name of y variable.

se

The standard error variable to create error bars.

Examples

1
2
3
4
5
aa <- data.frame(condition = c("neutral","positive","negative"),
                accuracy = c(.6, .74, .8),
                se_accuracy = c(.04, .08, .09))
bplot(datset = aa, x = "condition", y = "accuracy", e = "se_accuracy",
        xlab = "Experimental Condition", ylab = "Mean Accuracy")

lfrank14/lurr documentation built on May 21, 2019, 12:20 p.m.