violin_compare {animaltracker}R Documentation

Compares summary statistics from two datasets as side-by-side violin plots

Description

Compares summary statistics from two datasets as side-by-side violin plots

Usage

violin_compare(df_summary, by, col_name, export = FALSE, out = NULL)

Arguments

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

Value

side-by-side violin plots

Examples

# 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")


[Package animaltracker version 0.2.0 Index]