This is an overview of how to use functions in the feedr package to transform and visual your RFID data. Note that while we’ve tried to explain the code in detail, if you are new to R, you may benefit from an introduction to coding in R before tackling your data with the feedr package

Order of operations

This package contains functions to perform three broad services:

  1. Loading/Importing Data
    Raw data directly from the loggers, already amalgamated, or from the animal__nexus__ website
  2. Housekeeping
    Functions for checking and correcting errors before you transform the data
  3. Transformations
    Transforming raw data into visits, presence, activity, etc
  4. Visualizations
    Static or interactive maps produced by the mapping functions which visualize movements between and presence around the RFID loggers.

There are also three ‘user-interface’ (UI) functions that can be used to simplify the use of these functions (see below).

In the normal order of operations, several functions depend on the output of other functions.

For example, to get daily activity patterns, you could get your data from the animalnexus database with dl_data(), turn this raw data to visits data with visits(), turn visits data to activity data with activity() and finally, turn activity data into daily activity patterns with daily().

Tutorial Data

Two data frames, finches and chickadees are included in the feedr package for the purpose of demonstration.

head(finches)
##    animal_id       date                time logger_id     species age sex    site_name       lon      lat
## 1 0620000514 2016-01-28 2016-01-28 12:34:25      2200 House Finch AHY   F Kamloops, BC -120.3612 50.66778
## 2 0620000514 2016-01-28 2016-01-28 12:34:28      2200 House Finch AHY   F Kamloops, BC -120.3612 50.66778
## 3 041868D861 2016-01-28 2016-01-28 12:35:41      2200 House Finch AHY   M Kamloops, BC -120.3612 50.66778
## 4 06200004F8 2016-01-28 2016-01-28 12:35:52      2200 House Finch AHY   F Kamloops, BC -120.3612 50.66778
## 5 06200004F8 2016-01-28 2016-01-28 12:35:59      2200 House Finch AHY   F Kamloops, BC -120.3612 50.66778
## 6 06200004F8 2016-01-28 2016-01-28 12:36:02      2200 House Finch AHY   F Kamloops, BC -120.3612 50.66778
head(chickadees)
##    animal_id       date                time     logger_id experiment      lat       lon
## 1 06200004BF 2016-01-11 2016-01-11 10:48:49 exp2-GR10DATA       exp2 53.89086 -122.8193
## 2 062000038F 2016-01-11 2016-01-11 10:48:50 exp2-GR10DATA       exp2 53.89086 -122.8193
## 3 06200004E4 2016-01-11 2016-01-11 10:48:55 exp2-GR10DATA       exp2 53.89086 -122.8193
## 4 06200004BF 2016-01-11 2016-01-11 10:50:02 exp2-GR10DATA       exp2 53.89086 -122.8193
## 5 06200004E4 2016-01-11 2016-01-11 10:51:07 exp2-GR10DATA       exp2 53.89086 -122.8193
## 6 06200004BE 2016-01-11 2016-01-11 10:51:51 exp2-GR10DATA       exp2 53.89086 -122.8193

Function Index

Loading/Importing Data

  • ui_import(): Launch an interactive user-interface to import/load local data files
  • load_raw(): Load in a single file of raw logger data
  • load_raw_all(): Load in and combine multiple files of raw logger data
  • dl_data(): Download and load data directly from the animal__nexus__ website

Housekeeping

  • check_ids(): Remove known bad ids (i.e. errors, wands, etc.)
  • check_problems(): Fix known id problems

Transformations

  • ui_trans(): Launch an interactive user-interface to transform data
  • visits(): Transform raw data into visits data
  • move(): Transform visits data into movements between loggers
  • presence(): Transform visits data into presence around loggers
  • disp(): Transform visits data into displacements
  • dom(): Transform displacements into dominance matrices and hierarchies
  • activity(): Transform visits data into activity data
  • daily(): Transform activity data into daily activity patterns

Visualizations

  • ui_animate(): Launch an interactive user-interface to create animations
  • map_ggmap(): Visualize movements and/or presence with ggmap (static)
  • map_leaflet(): Visualize movements and/or presence with leaflet (interactive)

Back to top
Continue with loading/importing data