mf_fig1_fun | R Documentation |
Function to produce figure 1 of the monthly factsheet.
mf_fig1_fun(data, collection)
data |
A data frame giving the counts of cases for a month per row, with a date colummn which will be used as x variable and count of cases for a collection to be used as the y variable. |
collection |
A string giving the name of the collection, which is the same as the name of the column in the data frame |
A ggplot showing the trend in counts of cases of the given collection
data(mf_trend_data)
head(mf_trend_data)
my_plot <- mf_fig1_fun(data = mf_trend_data, collection = "mrsa")
my_plot
my_plot <- mf_fig1_fun(data = mf_trend_data, collection = "mssa")
my_plot
my_plot <- mf_fig1_fun(data = mf_trend_data, collection = "ecoli")
my_plot
mf_trend_data$kleb <- NULL
names(mf_trend_data)[5] <- "kleb"
my_plot <- mf_fig1_fun(data = mf_trend_data, collection = "kleb")
my_plot
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.