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

NOTE: As of Nov 10th, 2021, feedrshiny UI functions have been moved to thefeedrUI` package.

I’m in the process of updating this documentation (slowly!) so parts may seem out of date. Let me know (open an issue) if you find anything particularly problematic, thanks!

Order of operations

This package contains functions to perform three broad services:

  1. Loading/Importing Data
    Raw data directly from the loggers, or data already amalgamated
  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.

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

For example, to get daily activity patterns, you could load your raw data with load_raw(), 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)
## # A tibble: 6 × 10
##   animal_id  date       time                logger_id species     age   sex   site_name      lon   lat
##   <fct>      <date>     <dttm>              <fct>     <chr>       <chr> <chr> <chr>        <dbl> <dbl>
## 1 0620000514 2016-01-28 2016-01-28 12:34:25 2200      House Finch AHY   F     Kamloops, BC -120.  50.7
## 2 0620000514 2016-01-28 2016-01-28 12:34:28 2200      House Finch AHY   F     Kamloops, BC -120.  50.7
## 3 041868D861 2016-01-28 2016-01-28 12:35:41 2200      House Finch AHY   M     Kamloops, BC -120.  50.7
## 4 06200004F8 2016-01-28 2016-01-28 12:35:52 2200      House Finch AHY   F     Kamloops, BC -120.  50.7
## 5 06200004F8 2016-01-28 2016-01-28 12:35:59 2200      House Finch AHY   F     Kamloops, BC -120.  50.7
## 6 06200004F8 2016-01-28 2016-01-28 12:36:02 2200      House Finch AHY   F     Kamloops, BC -120.  50.7
head(chickadees)
## # A tibble: 6 × 7
##   animal_id  date       time                logger_id     experiment   lat   lon
##   <fct>      <date>     <dttm>              <fct>         <chr>      <dbl> <dbl>
## 1 06200004BF 2016-01-11 2016-01-11 10:48:49 exp2-GR10DATA exp2        53.9 -123.
## 2 062000038F 2016-01-11 2016-01-11 10:48:50 exp2-GR10DATA exp2        53.9 -123.
## 3 06200004E4 2016-01-11 2016-01-11 10:48:55 exp2-GR10DATA exp2        53.9 -123.
## 4 06200004BF 2016-01-11 2016-01-11 10:50:02 exp2-GR10DATA exp2        53.9 -123.
## 5 06200004E4 2016-01-11 2016-01-11 10:51:07 exp2-GR10DATA exp2        53.9 -123.
## 6 06200004BE 2016-01-11 2016-01-11 10:51:51 exp2-GR10DATA exp2        53.9 -123.

Function Index

Loading/Importing Data

  • ui_import(): (feedrUI package) 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

Housekeeping

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

Transformations

  • ui_trans(): (feedrUI package) 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(): (feedrUI package) Launch an interactive user-interface to create animations
  • map_leaflet(): Visualize movements and/or presence with leaflet (interactive)

Back to top
Continue with loading/importing data