Displaying 1 result from an estimated 1 matches for "cs_moncost_excltaxcar".
2012 Sep 06
1
use of ddply() within function
...summarize,costcsolo = sum(CARaux[[costcarin]]))
With the following error message:
Error in (function(x, i, exact) if (is.matrix(i)) as.matrix(x)[[i]] else .subset2(x, :
object 'costcarin' not found
When I debugged the function, I found the following:
Browse[1]> costcarin
[1] "CS_MONCOST_EXCLTAXCAR"
Browse[1]> summary(CARaux[[costcarin]])
Min. 1st Qu. Median Mean 3rd Qu. Max.
0.0000000 0.0000000 0.0001605 0.0166700 0.0048570 0.1633000
Browse[1]> COSTaux_AVCAR <- ddply(CARaux,c("SC","YEAR"),summarize,costcsolo = sum(CARaux[["...