README.md

cowlogdata

cowlogdata: an R package to analyze and visualize observations generated by the event logging software CowLog

cowlogdata takes a list of individual observation csv files generated by CowLog (though any csv files can be used if adjusted for formatting), compiles a summary dataset, and then generates initial data exploration graphs such as boxplots, pie charts, and time series graphs.

Author: Kelly Wallace (kelly.wallace@emory.edu) Link to CowLog: http://cowlog.org/cowlog3/

If used in published research please cite as: Wallace, KJ (2020) cowlogdata: analyze and visualize observations generated by the event logging software CowLog: R package version 0.1.2

install

copy and paste everything that looks like this into R

if (!"devtools" %in% installed.packages()) install.packages("devtools"); library(devtools)

install_github("kellyjwallace/cowlogdata")

library(cowlogdata)

try ?clseries to make sure everything has loaded correctly. You should see a summary of the function clseries if it's working.

functions

clflag clflag is designed to identify any cowlog csv observation sheets that may have scorer input errors. It flags csv files that do not include an END entry, that have fewer than three entries, and that report negative time differences between entries.

cldata cldata generates a summary dataframe based on individual cowlog csv observations. Additionaly it generates a list of zones identified in the observations.

clseries to visualize average movement in the arena over time, clseries splits the observations into ten even segments of the same length and visualizes the average relative time spent in zones per time segment.

clseries!

clpie to visualize where individuals are spending time in the observations, clpie generates a pie graph of proportion time in each zone, and can generate pie graphs per category.

clpie!

clboxplot to visualize and compare the distribution of values, clboxplot generates boxplots of values and additionally can compare distributions across categories via t-tests and anovas.

clboxplot!

clreg to determine which metrics correlate with each other and/or show interaction effects of factors, clreg runs linear regression models and generates summary scatterplots.

clreg!

notes

Note: This package is designed to use csv sheets from just base cowlog data, not data that has used modifiers Note: This package is designed to be used for location data, not event logs. See below for the individual csv sheet requirements. Note: Many of the functions included in this package likely only work on Windows due to path character specifications (forwardslash vs backslash).

example filename "arthur_male_round1.csv" Note: the filename must be separated by underscores.

example csv sheet The function of the csv sheets (and the way CowLog should be intended for use in relation to this package) is to track the location data of a focal individual across different areas of an apparatus/enclosure. As seen below, a time stamp is recorded of when an individual transitioned to a new zone (e.g. 264 seconds into the observation, the focal individual moved from upper left corner to left interaction)

Note: column names should always be "time" and "code" (optional to include "class") Note: when calculating time, time always begins at the first entry (shown here as 0.015 seconds into the observation) Note: every spreadsheet must end with a last observation coded "END"

sheet!

necessary packages

dplyr ggplot2 viridis stringr broom



kellyjwallace/cowlogdata documentation built on Dec. 2, 2023, 1:30 a.m.