Skip to contents

Processes 'GreenFeed' visits and food drops for a requested period. Generates a list of animals not visiting the 'GreenFeed' to manage them, and a description of animals visiting the 'GreenFeed'.

Arguments

file_path

a character string or list representing files(s) with feedtimes from 'C-Lock Inc.'.

unit

numeric or character vector or list representing one or more GreenFeed unit numbers.

start_date

a character string representing the start date of the study (format: "mm/dd/yyyy")

end_date

a character string representing the end date of the study (format: "mm/dd/yyyy")

rfid_file

a character string representing the file with individual RFIDs. The order should be Visual ID (col1) and RFID (col2)

Value

A list of two data frames:

visits_per_unit

Data frame with daily processed 'GreenFeed' data, including columns for VisualID, Date, Time, number of drops, and visits.

visits_per_animal

Data frame with weekly processed 'GreenFeed' data, including columns for VisualID, total drops, total visits, mean drops, and mean visits.

Examples

# You should provide the feedtimes files.
# it could be a list of files if you have data from multiple units to combine
path <- list(system.file("extdata", "feedtimes.csv", package = "greenfeedr"))

# If the user include an rfid file, the structure should be in col1 AnimalName or VisualID, and
# col2 the RFID or TAG_ID. The file could be save in different formats (.xlsx, .csv, or .txt).
RFIDs <- system.file("extdata", "RFID_file.csv", package = "greenfeedr")

data <- viseat(
  file_path = path,
  unit = 1,
  start_date = "2024-05-13",
  end_date = "2024-05-25",
  rfid_file = RFIDs
)
#> Animal IDs not visiting GF: Animal11, Animal12, Animal13, Animal14, Animal16, Animal17, Animal18, Animal19, Animal20, Animal21, Animal22, Animal23, Animal24, Animal25, Animal26, Animal27, Animal28, Animal29, Animal30, Animal32
#> list(FID = 1, n = 5485)list(<environment>, <environment>)<environment><environment>list(x = ~as.factor(FID), y = ~n, fill = ~as.factor(FID))list(line = list(colour = "black", linewidth = 0.5, linetype = 1, lineend = "butt", arrow = FALSE, inherit.blank = TRUE), rect = list(fill = "white", colour = "black", linewidth = 0.5, linetype = 1, inherit.blank = TRUE), text = list(family = "", face = "plain", colour = "black", size = 11, hjust = 0.5, vjust = 0.5, angle = 0, lineheight = 0.9, margin = c(0, 0, 0, 0), debug = FALSE, inherit.blank = TRUE), title = NULL, aspect.ratio = NULL, axis.title = NULL, axis.title.x = list(family = NULL, face = NULL, 
#>     colour = NULL, size = NULL, hjust = NULL, vjust = 1, angle = NULL, lineheight = NULL, margin = c(2.75, 0, 0, 0), debug = NULL, inherit.blank = TRUE), axis.title.x.top = list(family = NULL, face = NULL, colour = NULL, size = NULL, hjust = NULL, vjust = 0, angle = NULL, lineheight = NULL, margin = c(0, 0, 2.75, 0), debug = NULL, inherit.blank = TRUE), axis.title.x.bottom = NULL, axis.title.y = list(family = NULL, face = NULL, colour = NULL, size = NULL, hjust = NULL, vjust = 1, angle = 90, lineheight = NULL, 
#>     margin = c(0, 2.75, 0, 0), debug = NULL, inherit.blank = TRUE), axis.title.y.left = NULL, axis.title.y.right = list(family = NULL, face = NULL, colour = NULL, size = NULL, hjust = NULL, vjust = 1, angle = -90, lineheight = NULL, margin = c(0, 0, 0, 2.75), debug = NULL, inherit.blank = TRUE), axis.text = list(family = NULL, face = NULL, colour = "grey30", size = 0.8, hjust = NULL, vjust = NULL, angle = NULL, lineheight = NULL, margin = NULL, debug = NULL, inherit.blank = TRUE), axis.text.x = list(
#>     family = NULL, face = NULL, colour = NULL, size = NULL, hjust = NULL, vjust = 1, angle = NULL, lineheight = NULL, margin = c(2.2, 0, 0, 0), debug = NULL, inherit.blank = TRUE), axis.text.x.top = list(family = NULL, face = NULL, colour = NULL, size = NULL, hjust = NULL, vjust = 0, angle = NULL, lineheight = NULL, margin = c(0, 0, 2.2, 0), debug = NULL, inherit.blank = TRUE), axis.text.x.bottom = NULL, axis.text.y = list(family = NULL, face = NULL, colour = NULL, size = NULL, hjust = 1, vjust = NULL, 
#>     angle = NULL, lineheight = NULL, margin = c(0, 2.2, 0, 0), debug = NULL, inherit.blank = TRUE), axis.text.y.left = NULL, axis.text.y.right = list(family = NULL, face = NULL, colour = NULL, size = NULL, hjust = 0, vjust = NULL, angle = NULL, lineheight = NULL, margin = c(0, 0, 0, 2.2), debug = NULL, inherit.blank = TRUE), axis.text.theta = NULL, axis.text.r = list(family = NULL, face = NULL, colour = NULL, size = NULL, hjust = 0.5, vjust = NULL, angle = NULL, lineheight = NULL, margin = c(0, 2.2, 
#> 0, 2.2), debug = NULL, inherit.blank = TRUE), axis.ticks = list(colour = "grey20", linewidth = NULL, linetype = NULL, lineend = NULL, arrow = FALSE, inherit.blank = TRUE), axis.ticks.x = NULL, axis.ticks.x.top = NULL, axis.ticks.x.bottom = NULL, axis.ticks.y = NULL, axis.ticks.y.left = NULL, axis.ticks.y.right = NULL, axis.ticks.theta = NULL, axis.ticks.r = NULL, axis.minor.ticks.x.top = NULL, axis.minor.ticks.x.bottom = NULL, axis.minor.ticks.y.left = NULL, axis.minor.ticks.y.right = NULL, axis.minor.ticks.theta = NULL, 
#>     axis.minor.ticks.r = NULL, axis.ticks.length = 2.75, axis.ticks.length.x = NULL, axis.ticks.length.x.top = NULL, axis.ticks.length.x.bottom = NULL, axis.ticks.length.y = NULL, axis.ticks.length.y.left = NULL, axis.ticks.length.y.right = NULL, axis.ticks.length.theta = NULL, axis.ticks.length.r = NULL, axis.minor.ticks.length = 0.75, axis.minor.ticks.length.x = NULL, axis.minor.ticks.length.x.top = NULL, axis.minor.ticks.length.x.bottom = NULL, axis.minor.ticks.length.y = NULL, axis.minor.ticks.length.y.left = NULL, 
#>     axis.minor.ticks.length.y.right = NULL, axis.minor.ticks.length.theta = NULL, axis.minor.ticks.length.r = NULL, axis.line = list(colour = "black", linewidth = 1, linetype = NULL, lineend = NULL, arrow = FALSE, inherit.blank = TRUE), axis.line.x = NULL, axis.line.x.top = NULL, axis.line.x.bottom = NULL, axis.line.y = NULL, axis.line.y.left = NULL, axis.line.y.right = NULL, axis.line.theta = NULL, axis.line.r = NULL, legend.background = list(fill = NULL, colour = NA, linewidth = NULL, linetype = NULL, 
#>         inherit.blank = TRUE), legend.margin = c(5.5, 5.5, 5.5, 5.5), legend.spacing = 11, legend.spacing.x = NULL, legend.spacing.y = NULL, legend.key = NULL, legend.key.size = 1.2, legend.key.height = NULL, legend.key.width = NULL, legend.key.spacing = 5.5, legend.key.spacing.x = NULL, legend.key.spacing.y = NULL, legend.frame = NULL, legend.ticks = NULL, legend.ticks.length = 0.2, legend.axis.line = NULL, legend.text = list(family = NULL, face = NULL, colour = NULL, size = 0.8, hjust = NULL, vjust = NULL, 
#>         angle = NULL, lineheight = NULL, margin = NULL, debug = NULL, inherit.blank = TRUE), legend.text.position = NULL, legend.title = list(family = NULL, face = NULL, colour = NULL, size = NULL, hjust = 0, vjust = NULL, angle = NULL, lineheight = NULL, margin = NULL, debug = NULL, inherit.blank = TRUE), legend.title.position = NULL, legend.position = "right", legend.position.inside = NULL, legend.direction = NULL, legend.byrow = NULL, legend.justification = "center", legend.justification.top = NULL, 
#>     legend.justification.bottom = NULL, legend.justification.left = NULL, legend.justification.right = NULL, legend.justification.inside = NULL, legend.location = NULL, legend.box = NULL, legend.box.just = NULL, legend.box.margin = c(0, 0, 0, 0), legend.box.background = list(), legend.box.spacing = 11, panel.background = list(fill = "white", colour = NA, linewidth = NULL, linetype = NULL, inherit.blank = TRUE), panel.border = list(), panel.spacing = 5.5, panel.spacing.x = NULL, panel.spacing.y = NULL, 
#>     panel.grid = list(colour = "grey92", linewidth = NULL, linetype = NULL, lineend = NULL, arrow = FALSE, inherit.blank = TRUE), panel.grid.major = list(), panel.grid.minor = list(), panel.grid.major.x = NULL, panel.grid.major.y = NULL, panel.grid.minor.x = NULL, panel.grid.minor.y = NULL, panel.ontop = FALSE, plot.background = list(fill = NULL, colour = "white", linewidth = NULL, linetype = NULL, inherit.blank = TRUE), plot.title = list(family = NULL, face = NULL, colour = NULL, size = 1.2, hjust = 0, 
#>         vjust = 1, angle = NULL, lineheight = NULL, margin = c(0, 0, 5.5, 0), debug = NULL, inherit.blank = TRUE), plot.title.position = "panel", plot.subtitle = list(family = NULL, face = NULL, colour = NULL, size = NULL, hjust = 0, vjust = 1, angle = NULL, lineheight = NULL, margin = c(0, 0, 5.5, 0), debug = NULL, inherit.blank = TRUE), plot.caption = list(family = NULL, face = NULL, colour = NULL, size = 0.8, hjust = 1, vjust = 1, angle = NULL, lineheight = NULL, margin = c(5.5, 0, 0, 0), debug = NULL, 
#>         inherit.blank = TRUE), plot.caption.position = "panel", plot.tag = list(family = NULL, face = NULL, colour = NULL, size = 1.2, hjust = 0.5, vjust = 0.5, angle = NULL, lineheight = NULL, margin = NULL, debug = NULL, inherit.blank = TRUE), plot.tag.position = "topleft", plot.tag.location = NULL, plot.margin = c(5.5, 5.5, 5.5, 5.5), strip.background = list(fill = "white", colour = "black", linewidth = 2, linetype = NULL, inherit.blank = TRUE), strip.background.x = NULL, strip.background.y = NULL, 
#>     strip.clip = "inherit", strip.placement = "inside", strip.text = list(family = NULL, face = NULL, colour = "grey10", size = 0.8, hjust = NULL, vjust = NULL, angle = NULL, lineheight = NULL, margin = c(4.4, 4.4, 4.4, 4.4), debug = NULL, inherit.blank = TRUE), strip.text.x = NULL, strip.text.x.bottom = NULL, strip.text.x.top = NULL, strip.text.y = list(family = NULL, face = NULL, colour = NULL, size = NULL, hjust = NULL, vjust = NULL, angle = -90, lineheight = NULL, margin = NULL, debug = NULL, 
#>         inherit.blank = TRUE), strip.text.y.left = list(family = NULL, face = NULL, colour = NULL, size = NULL, hjust = NULL, vjust = NULL, angle = 90, lineheight = NULL, margin = NULL, debug = NULL, inherit.blank = TRUE), strip.text.y.right = NULL, strip.switch.pad.grid = 2.75, strip.switch.pad.wrap = 2.75)<environment><environment><environment><environment>list(x = "Units", y = "Frequency", fill = "Unit", title = "TAG reads per unit", label = "n")