An R package to analyze the parliamentary records of the 19th legislative period of the Bundestag, the German parliament.
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

53 строки
1.4KB

  1. % Generated by roxygen2: do not edit by hand
  2. % Please edit documentation in R/analyze.R
  3. \name{bar_plot_fractions}
  4. \alias{bar_plot_fractions}
  5. \title{Bar chart visualizing fraction based data}
  6. \usage{
  7. bar_plot_fractions(
  8. tb,
  9. x_variable = NULL,
  10. y_variable = NULL,
  11. fill = NULL,
  12. title = NULL,
  13. xlab = "Fraction",
  14. ylab = "n",
  15. filllab = "Fraction",
  16. flipped = TRUE,
  17. position = "dodge",
  18. reorder = FALSE
  19. )
  20. }
  21. \arguments{
  22. \item{tb}{tibble}
  23. \item{x_variable}{column in tb, default is fraction}
  24. \item{y_variable}{column in tb, default is n}
  25. \item{fill}{column in tb, default is fraction}
  26. \item{title}{plot title}
  27. \item{xlab}{label for x axis, default is fraction}
  28. \item{ylab}{label for y axis, default is n}
  29. \item{filllab}{default is 'Fraction'}
  30. \item{flipped}{if TRUE draw bars horizontally, else vertically. Default is TRUE}
  31. \item{position}{default is 'dodge'}
  32. \item{reorder}{Either reorder fraction factor by variable value or reorder fraction factor by party seat order in parliament (default).
  33. plot data from tb in the following way: for each item in x_variable show the corresponding value in y_variable.
  34. Then color the plot depending on the fill value.
  35. Give the plot a title and a label for x-axis and y-axis,
  36. color the legend according to filllab and finally
  37. improve positioning details according to position}
  38. }
  39. \description{
  40. Can be configured to also visualize data not related to fractions.
  41. }