Quality-control settings

Set every threshold of the pipeline in one object; override single parameters.

qc_config()

Build Quality-Control Settings

fiv_max_example() bin_fcr_example()

Example threshold tables

Read and prepare station data

Read NEDAP or FIRE exports (many files or a folder), turn them into one standard visit table and add breed information.

read_station()

Read Feeding Station Export Files

station_format()

Station Formats: Map Export Columns to Standard Fields

prep_visits()

Prepare a Standard Visit Table

add_breed()

Add Breed Information to a Visit Table

Body weight and daily gain

Flag implausible body weights, fill the missing daily weights of the stage and compute ADG as the slope of the daily weights.

clean_weight()

Clean Body Weight Records and Check Each Pig

calc_adg()

Compute Average Daily Gain (ADG) from Growth Curves

Feed intake and feed conversion

Flag feeder errors, correct and impute daily feed intake, and combine ADG and ADFI into FCR.

flag_feed_errors()

Flag Feeder Errors (Casey et al. 2005)

calc_adfi()

Correct and Impute Daily Feed Intake (ADFI)

calc_fcr()

Compute Feed Conversion Ratio (FCR) with Confidence Flags

Whole pipeline

Run every step in a row with one set of QC settings and keep all intermediate results.

run_pipeline()

Run the Whole Analysis Pipeline

Export

Write all result tables to CSV files for the testing station, or an HTML report to browse station by station.

write_results()

Write Analysis Results to CSV Files

write_report()

Write an HTML Report to Browse Station by Station

Validation

Check the outlier methods, growth curve models, weight fill and feed intake imputation on your own data, by spoiling or hiding part of it on purpose.

validate_outliers()

Validate Weight Outlier Methods with Artificial Errors

validate_adg()

Validate Growth Curve Models

validate_weight_fill()

Validate Body Weight Fill Methods

validate_adfi()

Validate Feed Intake Imputation

validate_truncation()

Validate the Whole Pipeline by Truncating Pigs

Plots

One plot per station and one panel per pig; write them to files.

plot_adg()

Plot Growth Curves per Station

plot_adfi()

Plot Daily Feed Intake per Station

save_plots()

Save Plots to Files

Example data

Raw exports from NEDAP and FIRE stations, used in every example.

nedap

Example Visits from NEDAP Feeding Stations

fire

Example Visits from FIRE Feeding Stations