graphCondition: Line Graph and Pie Graphs for Sex and Age Groups for NSSP...

Description Usage Arguments Details Value

Description

Line Graph and Pie Graphs for Sex and Age Groups for NSSP Data

Usage

1
graphCondition(dfevents, dfcond, condition)

Arguments

dfevents

a data.frame containing the values to display in the graphs.

dfcond

a data.frame containing the predicted positive cases for the condition

condition

a string used in the title and other places of the graphs

Details

The dfevents data.frame contains the following columns: Visit_Date (a sequence of days that spans over a selected period), Number_of_Visits.x (the total number of cases identified for each day for the whole state), condition (a column containing one label, that of the condition), Number_of_Visits.y (the total number of ED visits for the whole state), and pct (the percentage of ED visits identified as positive cases) . The purpose of the dfcond data.frame is to provide data for the pie graphs. The dfcond data.frame must contain the following columns: Gender and Agecat, which represents the age category. So any data set can be used as long as it contains the two variables. Please note both columns Gender and Agecat are factors but they can be strings that are coerced by the function into categories. Sometimes there may be issues with ggplot2 and it gives you an error such as 'Error in .Call.graphics(C_palette2, .Call(C_palette2, NULL)) : invalid graphics state'. In that case issuing the command dev.off() may help solve the problem.

Value

a list containing graphical objects


hmenag1/ss4weka documentation built on May 17, 2019, 4:34 p.m.