Description Usage Arguments Value Examples
View source: R/data_analysis.R
Compares summary statistics from two datasets as side-by-side violin plots
1 | violin_compare(df_summary, by, col_name, export = FALSE, out = NULL)
|
df_summary |
data frame of summary statistics from both datasets to be compared |
by |
GPS or Date |
col_name |
variable in df_summary to be used for the y-axis, as a string |
export |
logical, whether to export plot, defaults to False |
out |
.png file name to save plot when export is True |
side-by-side violin plots
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | # Violin plot comparing unfiltered and filtered demo data summaries by date for a single variable
## Summarise unfiltered demo
unfiltered_summary <- summarise_anidf(demo_unfiltered_elev, Date, Latitude, Longitude,
Distance, Course, Rate, Elevation, daily=FALSE)
## Summarise filtered demo
filtered_summary <- summarise_anidf(demo_filtered_elev, Date, Latitude, Longitude,
Distance, Course, Rate, Elevation, daily=FALSE)
## Join
summary <- join_summaries(unfiltered_summary, filtered_summary, "Date", daily=FALSE)
## Violin plot
violin_compare(summary, Date, "meanElev")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.