Create a vizid Object
init_vizid.RdCreate a vizid Object
Usage
init_vizid(data, roles = init_roles(), components = init_components())Arguments
- data
A data frame with infectious disease data.
- roles
An object produced by
init_roles, which maps variable roles to specific names of variables indataand/or the return values of data.- components
An object produced by
init_components, which storesggplot2components (e.g., the results of functions likegeom_line()andscales_x_continuous()) that would be combined into a plot if the vizid object is passed to theplot().
Value
A data frame of class "vizid" that knows what roles its variables
will plot in a visualization. These roles are stored in attributes. These
attributes also contains an initially empty list, plot_components, that
can be filled up with ggplot2 plot components that can be used when the
plot function is called.