fix errors from refactoring and add documentation to all remaining functions in analyze.R

This commit is contained in:
2021-08-07 00:31:56 +02:00
parent 5f9343bf7f
commit 5e9f70627d
10 changed files with 237 additions and 16 deletions
+54
View File
@@ -0,0 +1,54 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/analyze.R
\name{bar_plot_fractions}
\alias{bar_plot_fractions}
\title{plot data depending on fractions in a standardized, configurable way}
\usage{
bar_plot_fractions(
tb,
x_variable = NULL,
y_variable = NULL,
fill = NULL,
title = NULL,
xlab = "Fraction",
ylab = "n",
filllab = "Fraction",
flipped = TRUE,
position = "dodge",
reorder = FALSE
)
}
\arguments{
\item{tb}{tibble}
\item{x_variable}{column in tb}
\item{y_variable}{column in tb}
\item{fill}{column in tb}
\item{title}{char}
\item{xlab}{char}
\item{ylab}{char}
\item{filllab}{char}
\item{flipped}{bool}
\item{position}{char}
\item{reorder}{bool
plot data from tb in the following way: for each item in x_variable show the corresponding value in y_variable.
Then color the plot depending on the fill value
Give the plot a title, an x-label xlab as well as an y-label ylab
Color the legend according to filllab
Setting flipped to TRUE makes the bars horizontal
Improve positioning details according to position
and finally reorder x_variable (default ist to order fractions according to seat order)}
}
\description{
plot data depending on fractions in a standardized, configurable way
}