Displaying 2 results from an estimated 2 matches for "posfut".
Did you mean:
posfix
2010 Jun 01
1
data frame manipulation ddply
...200", "14.9200", "14.9200", "14.9200", "14.9200"
)), .Names = c("DESCRIPTION", "CREATED.DATE", "QUANTITY",
"SETTLEMENT"), row.names = c(NA, 12L), class = "data.frame")
Here is the line I pass :
>PosFut=ddply(futures, c("DESCRIPTION","SETTLEMENT"), summarise, POSITION=
sum(QUANTITY))[,c(1,3,2)]
And here the result :
PosFut <-
structure(list(DESCRIPTION = structure(1:3, .Label = c("CORN Jul/10",
"LIVE CATTLE Aug/10", "SUGAR NO.11 Jul/10"), cla...
2010 Jun 01
1
data frame manipulation with zero rows
..."14.9200", "14.9200", "14.9200"
)), .Names = c("DESCRIPTION", "CREATED.DATE", "QUANTITY",
"SETTLEMENT"), row.names = c(NA, 12L), class = "data.frame")
I need then to apply to the df this following code line :
>PosFut=ddply(futures, c("DESCRIPTION","SETTLEMENT"), summarise, POSITION=
sum(QUANTITY))[,c(1,3,2)]
It works perfectly in most of case, BUT I have a new problem: it can
sometime occurs that my df "futures" is empty, with zero rows.
futures <-
structure(list(DESCRIPTION...