Displaying 1 result from an estimated 1 matches for "cppf".
Did you mean:
cpp
2007 Mar 16
1
Probably simple function problem
...les
# is the length of the data.frame.
# Can anyone suggest what I am doing wrong or am I
just misunderstanding what
# a function is supposed to do?
#Example:
adjusts <- c(.50, .70, .29, .27 , .40 , .26 , 125)
coal <- 1:6
newdata <- 1:10
fuel.costing <- function(fuel, utr, mydata) {
cppf <- cppm <- fuel ;
cppf[2] <- fuel[2]*(1-utr[2])*length(mydata) + utr[7]*
utr[2]*utr[5] ;
cppf[4] <- fuel[2]*(1-utr[4])*length(mydata) + utr[7]*
utr[4]*utr[6] ;
cppm[2] <- fuel[2]*(1-utr[1])*length(mydata) ;
cppm[4] <- fuel[2]*(1-utr[3])*length(mydata)
}
fuel.costing(coal, adjusts...