Package {PoultryEconR}


Type: Package
Title: Poultry Economic Analysis Tools
Version: 0.1.0
Description: Provides tools for poultry production and economic analysis. The package calculates feed conversion ratio (FCR), hen-day egg production (HDEP), hen-housed egg production (HHEP), cost per egg, profit per bird, mortality percentage, and an overall efficiency score based on predefined performance benchmarks. The results can optionally be exported to an Excel workbook and visualized using a bar chart.
License: GPL-3
Encoding: UTF-8
Depends: R (≥ 4.1.0)
Imports: writexl
Suggests: knitr, rmarkdown, testthat (≥ 3.0.0)
Config/testthat/edition: 3
Config/roxygen2/version: 8.0.0
NeedsCompilation: no
Packaged: 2026-07-30 15:36:20 UTC; JARVIS
Author: M. Petchi Praveen [aut, cre], Niraj US [aut], S. Vishnu Shankar [aut]
Maintainer: M. Petchi Praveen <pravinmariappan7@gmail.com>
Repository: CRAN
Date/Publication: 2026-08-07 21:40:02 UTC

Poultry Economic Analysis

Description

Calculates poultry production, economic indicators, efficiency scores, overall efficiency, and performance grade for poultry farms.

Usage

PoultryEconR(
  Data,
  plot = TRUE,
  export = FALSE,
  file = "Poultry_Analysis_Output.xlsx"
)

Arguments

Data

A data frame containing the variables feed_consumed, weight_gained, number_of_eggs, number_of_live_birds, number_of_birds_housed_initially, total_cost, total_eggs_produced, revenue, number_of_dead_birds, and area.

plot

Logical. If TRUE, displays a bar plot of overall efficiency.

export

Logical. If TRUE, exports the results to an Excel file.

file

Character. Name of the Excel file created when export = TRUE.

Details

The function calculates:

Efficiency scores are calculated for each indicator and combined to obtain an overall efficiency score. Based on this score, each record is classified into one of five performance grades: Excellent, Good, Average, Poor, or Very Poor.

Value

A data frame containing:

Examples

poultry_data <- data.frame(
  feed_consumed = c(300, 320),
  weight_gained = c(180, 190),
  number_of_eggs = c(170, 175),
  number_of_live_birds = c(180, 185),
  number_of_birds_housed_initially = c(185, 190),
  total_cost = c(5000, 5200),
  total_eggs_produced = c(170, 175),
  revenue = c(7000, 7300),
  number_of_dead_birds = c(2, 3),
  area = c("Farm A", "Farm B")
)

PoultryEconR(poultry_data, plot = FALSE, export = FALSE)