format_data_for_plot: Returns data in the appropriate format for the user-specified...

View source: R/Standardization.R

format_data_for_plotR Documentation

Returns data in the appropriate format for the user-specified plot

Description

Returns data in the appropriate format for the user-specified plot

Usage

format_data_for_plot(
  data,
  fy_var,
  y_var,
  share = FALSE,
  start_fy = NA,
  end_fy = NA,
  color_var = "None",
  facet_var = "None",
  second_var = NULL,
  alpha_var = NULL,
  labels_and_colors = NULL,
  group = TRUE,
  drop_missing_labels = TRUE,
  add_ytextposition = FALSE
)

Arguments

data

A data frame to format for the plot, as a tibble

fy_var

The fiscal year variable, as string

y_var

The variable to be plotted on the y-axis

share

If TRUE, calculates the share as a percentage

start_fy

Start fiscal year

end_fy

End fiscal Year

color_var

Coloration variable, as string

facet_var

Facet variable, as string

second_var

Facet variable, as string

labels_and_colors

A csis360 lookup data.frame with factor information

group

If TRUE aggregate

drop_missing_labels

If TRUE, drop levels to avoid residual levels from labels_and_colors.

add_ytextposition

If TRUE, add a ytextposition numerical position to aid in adding text to a graph

Value

Returns a tibble of formatted data


CSISdefense/csis360 documentation built on April 19, 2024, 3:37 p.m.