herd_plot | R Documentation |
top
is a small function to not just present the first rows
herd_plot( df, herd_no_character, start_date = NULL, end_date = NULL, format = "%Y-%m-%d", plotly_output = TRUE, alternative_herd_no_name = NULL )
df |
master_tb dataset |
herd_no_character |
herd number |
start_date |
start date of plot search. Format, '%Y-%m-%d'. Default is NULL so all years are plotted. |
end_date |
end date of plot search. Format, '%Y-%m-%d'. Default is NULL so all years are plotted. |
format |
date format, Default: '%Y-%m-%d' |
plotly_output |
Decide whether plot output is static or interactive. Default is TRUE which returns interactive plotly graph. |
alternative_herd_no_name |
If you want to change the herd_no in title to something else. |
DETAILS
returns new column in BD dataset.
## Not run: if(interactive()){ p <- herd_plot(master_tb, "x1234567") p p <- herd_plot(master_tb, "x1234567", start_date = "2010-01-01") p p <- herd_plot(master_tb, "x1234567", plotly_output = FALSE) #static plot p p <- herd_plot(master_tb, "x1234567", plotly_output = FALSE, alternative_herd_no_name = "other name/number") p } ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.