process_rfid_data: Process RFID Data

View source: R/utils.R

process_rfid_dataR Documentation

Process RFID Data

Description

Processes RFID data from animals in the study.

Usage

process_rfid_data(rfid_file)

Arguments

rfid_file

Path or data frame containing RFID data.

Value

A data frame with standardized column names ('FarmName' and 'RFID'). If the input is invalid or if no valid data is provided, the function returns 'NULL'.

Examples

# Example with a data frame
df <- data.frame(
  V1 = c("Farm1", "Farm2", "Farm3"),
  V2 = c("12345", "67890", "54321")
)
processed_df <- process_rfid_data(df)
message(processed_df)

# Example with invalid input
invalid_data <- process_rfid_data(NULL)
# Expected output: message "RFID is NA. It is recommended to include it." and NULL
message(invalid_data)


greenfeedr documentation built on June 8, 2025, 11:38 a.m.