search for: pl_pos

Displaying 5 results from an estimated 5 matches for "pl_pos".

2009 Aug 28
2
new data.frame summed by date
Hi, I wonder if someone can suggest how to create a new data.frame Y from X where X$PL_Pos is summed by each unique X$MyDate. Y should end up with two (or more) columns Y$MyDate and Y$PL_Sum with its value being the cumsum of all the values in X for that date. - a 'daily cumsum'. Thanks, Mark TStoDate = function (TSDate) { X = strptime(TSDate + 19e6L, "%Y%m%d") ret...
2009 Jul 08
1
What is cast telling me?
...whether each experiment has values for both EnTime and ExTime? Assuming that cast is taking some sort of sum then I'd like to learn how to replace the value in the table with something meaningful to me. On thing would the the ExNum value from the first occurrence at that crosspoint, or the PL_Pos value, etc. How might I write a fun.aggregate to to that? Thanks, Mark > dim(MyResults) [1] 1105 12 > head(MyResults, n=15) ExNum PosType EnDate EnTime ExDate ExTime PL_Pos Costs Save2 time value id 1.1 1 -1 1080103 800 1080103 1310 520 26 0 1 746.2 1...
2009 Jul 11
1
sort data.frame by specific date column
I have a data.frame that was built from a number of smaller data.frames with rbind. Each ssmaller data.frame bound together runs over the same date ranges. The format of the whole thing looks like this: Trade PosType EnDate EnTime ExDate ExTime PL_Pos 1 1 1 1040107 915 1040107 1300 164 2 2 1 1040108 909 1040108 1300 184 3 3 1 1040115 921 1040115 1300 64 4 4 1 1040120 1134 1040120 1300 124 5 5 1 1040121 923 1040121 1300 84 6 6 1...
2009 Jul 07
4
Test for X=1 fails, test for >0 works, data in text file is 1
...something else first to ensure R sees the number the way I'm thinking about the number? Cheers, Mark > dim(X) [1] 25 425 > > ReShapeX <- melt(X, id = c("Trade", "PosType", "EnDate", "EnTime", "ExDate", "ExTime", "PL_Pos", "Costs", "Save2")) > > dim(ReShapeX) [1] 10400 11 > > MyResults <- subset(ReShapeX, value > 0) > > dim(MyResults) [1] 1105 11 > > MyResults.GroupA <- subset(MyResults, PosType = 1) > > dim(MyResults.GroupA) [1] 1105 11 > &g...
2009 Jul 09
2
How to Populate List
...whether each experiment has values for both EnTime and ExTime?    Assuming that cast is taking some sort of sum then I'd like to learn how to replace the value in the table with something meaningful to me. On thing would the the ExNum value from the first occurrence at that crosspoint, or the PL_Pos value, etc.    How might I write a fun.aggregate to to that? Thanks, Mark > dim(MyResults) [1] 1105   12 > head(MyResults, n=15)      ExNum PosType  EnDate EnTime  ExDate ExTime PL_Pos Costs Save2 time value id 1.1      1      -1 1080103    800 1080103   1310    520    26     0 1 746.2  1...