#Load observed data into the o dataframe o <- read.csv("Example Meta Data.csv") ls(o) #Dt_Nut = nutrient concentration in the diet #Dt_NutIn = nutrient intake #Calculate some other dietary nutrient intakes o$Dt_CHO <- o$Dt_St + o$Dt_NDF o$Dt_ChoIn <- o$Dt_CHO/100 * o$An_DMIn / 24 o$Dt_CPIn <- o$Dt_CP/100 * o$An_DMIn / 24 o$Dt_CPAIn <- o$Dt_CPA_CP/100 * o$Dt_CP/100 * o$Dt_DMIn o$Dt_CPBIn <- o$Dt_CPB_CP/100 * o$Dt_CP/100 * o$Dt_DMIn o$Dt_CPCIn <- o$Dt_CPC_CP/100 * o$Dt_CP/100 * o$Dt_DMIn #Create variables to match the model predicted values #daily rates are converted to hourly rates to match the model o$fDMI <- o$An_DMIn / 24 o$FChoSi <- (o$Du_StPas + o$Du_NDFPas) / 24 o$FCpSi <- o$Du_NANMN_g * 6.25 / 1000 / 24 o$FCpMiSi <- o$Du_MiN_g * 6.25 / 1000 / 24