Skip to content

skysheng7/competition_dominance_analysis

Repository files navigation

gif

Increased competition flattens the dominance hierarchy

This repository contains the data and code for our project: Redefining dominance calculation: Increased competition flattens the dominance hierarchy in dairy cows.

Getting Started

To load this project, please follow the instructions below:

  1. Set your working directory to the folder where this README.md file is located using setwd().

  2. Run the following R code to install required R packages:

# List of packages to be installed
packages <- c("ProjectTemplate", "lubridate", "plyr", "here", "zoo", "ggplot2", "EloRating", "EloSteepness", "viridis", "dplyr", "lme4", "lmerTest", "rstudioapi")

# Function to check and install missing packages
install_if_missing <- function(pkg) {
  if (!require(pkg, character.only = TRUE)) {
    install.packages(pkg, dependencies = TRUE)
  }
}

# Apply the function to each package
sapply(packages, install_if_missing)
  1. Run the following R code to load this R project:
library('ProjectTemplate')
load.project()
  1. Repository Structure Here's a brief overview of the repository's structure:
  • cache: Contains crucial intermediate data used in the final analysis.
  • config: Holds the configuration settings for this R project.
  • data: Contains both the raw data and the processed data resulting from our analysis.
  • graphs: Stores all the visual plots and graphs generated during the analysis.
  • lib: Houses helper functions crafted to assist in analysis and preprocessing.
  • munge: Contains scripts that utilize functions to preprocess the data.
  • renv: Provides details about the R environment set up during the project's inception.
  • reports: Contains the manuscript detailing our findings and observations.
  • src: Contains scripts used for the final statistical analysis.

Thank you for your interest in our project. We hope you find the data and code insightful!

Dataset Information

Contributors

  • Principal Investigator: Marina von Keyserlingk

    • ORCID: 0000-0002-1427-3152
    • Affiliation: University of British Columbia
    • Email: [email protected]
  • Co-Investigator: Daniel Weary

    • ORCID: 0000-0002-0917-3982
    • Affiliation: University of British Columbia
    • Email: [email protected]
  • Contributor: Kehan Sheng

    • ORCID: 0000-0001-6442-5284
    • Affiliation: University of British Columbia
    • Email: [email protected]
  • Contributor: Borbala Foris

    • ORCID: 0000-0002-0901-3057
    • Affiliation while working on this project: University of British Columbia
    • Current affiliation: University of Veterinary Medicine, Vienna
    • Email: [email protected]
  • Contributor: Joseph Krahn

    • ORCID: 0000-0002-1559-1216
    • Affiliation: University of British Columbia
    • Email: [email protected]

Project Information

  • Date of Data Collection: July 15, 2020 - May 19, 2021
  • Location of Data Collection: UBC Dairy Education and Research Centre, 6947 No. 7 Highway, Agassiz, BC V0M 1A0, Canada
  • Funding: This project was supported by the NSERC Industrial Research Chair.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages