feed is a system for getting the information of animal feeds. Basically, it can load, modify, and compare the animal feed dataset from Animal Feed Resources Information System (INRA CIRAD AFZ and FAO). In addition, the inner dataset from NIAS, NRC, and CVB is loaded.
# The development version from GitHub:
# install.packages("devtools")
devtools::install_github("adatalab/feed")
feed_list
function shows the list of feeds of feedipedia.org.
library(feed)
# All feeds
feed_list(category="all")
# Forage plants
feed_list("forage")
# Plant products/by-products
feed_list("plantProduct")
# Feeds of animal origin
feed_list("animalOrigin")
# Other feeds
feed_list("other")
feed_search
function shows the results you found at feedipedia.org. When you find the result that you want, copy the url for scraping the feed data using feed_info
function.
feed_search("maize")
feed_info
function shows the nutritive values of the specific feedstuff(url) in the form of a list. If you use extract option, a list is returned for each nutrient composition of the specific feed.
# The result of Maize germ meal and maize germ. url was found in the results of feed_search() function
# get the information about the url
feed_info(url="https://www.feedipedia.org/node/556")
# extract 2nd objects of nutrient composition dataset list
feed_info(url="https://www.feedipedia.org/node/556",extract=2)
feed_compare
function compares each result of feed composition.
# extract the result
feed1 <- feed_info("https://www.feedipedia.org/node/556",2)
feed2 <- feed_info("https://www.feedipedia.org/node/674",3)
# extract the main analysis results
feed1 <- feed1[[1]]
feed2 <- feed2[[1]]
# compare the results
feed_compare(feed1,feed2,name1="Corn",name2="SBM",radar=TRUE)
dm_asis
function converts dry-matter basis into as-is basis.
df <- data.frame(nutrient=c("CP","NDF","EE","Ash"),composition=c(10,30,5,2))
dm_asis(composition=df$composition,dm=85,digits=2)
asis_dm
function converts as-is basis into dry-mater basis.
df <- data.frame(nutrient=c("CP","NDF","EE","Ash"),composition=c(10,30,5,2))
asis_dm(composition=df$composition,dm=85,digits=2)
j_cal
function converts joule into calorie.
j_cal(joule = 4000, standard = "15")
cal_j
function converts calorie into joule.
cal_j(cal = 5000, standard = "15")
nrc_beef
loads the feed informations from BCNRM 2016 (Drs. Noel Andy Cole, Clinton R. Krehbiel, Ronald P. Lemenager, Galen E. Erickson, Joel Caton, Karen A. Beauchemin, Michael L. Galyean, Joan H. Eisemann, and Luis O. Tedeschi).
nrc_beef
#check the unit
attributes(nrc_beef)$unit
#or
str(nrc_beef)
This package is under development.
Email: ruminoreticulum@gmail.com