Displaying 9 results from an estimated 9 matches for "endat".
Did you mean:
ecdat
2009 Aug 28
2
new data.frame summed by date
...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")
return(as.Date(X))
}
X = structure(list(EnDate = c(1090803,
1090804, 1090805, 1090806, 1090806, 1090810, 1090811, 1090812,
1090813, 1090817, 1090819, 1090820, 1090820, 1090824, 1090825,
1090825, 1090826, 1090826, 1090827, 1090827, 1090827), PL_Pos = c(174,
-26, 614, 344, -26, 414, -626, 544, -106, -146, 1004, 344, 224,
-716, -176, 44, 354, -34...
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 1...
2009 Jul 11
2
Date conversions
...sons.
The code:
MyDate1 = read.csv("C:\\Date1.txt",header=TRUE)
MyDate2 = read.csv("C:\\Date2.txt",header=TRUE)
MyDate1
Date1 = MyDate1$Date
class(Date1)
mode(Date1)
Date1
Date1 = as.Date(Date1, "%m/%d/%y")
class(Date1)
mode(Date1)
Date1
MyDate2
Date2 = MyDate2$EnDate
class(Date2)
mode(Date2)
Date2
Date2 = strptime(Date2 + 19e6L, "%Y%m%d")
class(Date2)
mode(Date2)
Date2
Date2 = as.Date(Date2)
class(Date2)
mode(Date2)
Date2
Results follow.
Thanks,
Mark
> MyDate1 = read.csv("C:\\Date1.txt",header=TRUE)
> MyDate2 = read.csv("C...
2006 Jul 26
8
change text_field_tag class
in my booking / _form I have the following input fields : (startdate and
endate)
<div>
<label for="startdate">Booking Start Date</label><br />
<%= text_field_tag(''startdate'', @startdate, {:class => @startdateclass,
:readonly => "readonly", :maxlength => "25"} ) %>
<%= observe_field(&q...
2009 Jul 07
4
Test for X=1 fails, test for >0 works, data in text file is 1
...at I cannot test for that? Or is some case where I
need to use maybe as.numeric or 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 <- s...
2009 Jul 08
1
What is cast telling me?
...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
2.1 2 -1 1080104 755 1080104 1310 530 26 0
1 721.9 2
3.1 3 1 1080107 945 1080107 1310 -340 26 0
1 722.8 3
4.1...
2006 Nov 04
0
weird problem with content type
...here is the url:
http://rdigikam.sitlib.org/calendar/list?month=8&year=2006
the rest of the page that works:
http://rdigikam.sitlib.org/tags
any idea how I could get rid of this?
This is the code of my list.rhtml:
<center>
<br><br>
<% startdate = Time.local(2006,8,1)
endate = Time.local(2006,8,31)
cal = CalendarGrid.build(Time.local(@passedyear.to_i,@passedmonth.to_i,1))
puts "Content-Type: text/html"
%>
<% cal.years.each do |y| unless y.year.to_i!=@passedyear.to_i %> <br>
<%= link_to(("<"), :year => y.year.to_i-1, :...
2009 Jul 10
2
ReShape/cast question - sum of value in table
...e with is this:
Y = read.table("C:\\test.txt")
names(Y)[7] = "value"
Y
ReShape.Y = reshape(Y, varying=list(names(Y)[7]), direction='long')
ReShape.Y
cast(ReShape.Y, EnTime ~ ExTime)
When run the last two steps output the following:
> ReShape.Y
Trade PosType EnDate EnTime ExDate ExTime time value id
1 1 -1 1080103 800 1080103 1310 1 520 1
2 2 -1 1080104 755 1080104 1310 1 530 2
3 3 1 1080107 945 1080107 1310 1 -340 3
4 4 -1 1080108 820 1080108 1310 1 2150 4
5 5 -1 1...
2009 Jul 09
2
How to Populate List
...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
2.1 2 -1 1080104 755 1080104 1310 530 26 0
1 721.9 2
3.1 3 1 1080107 945 1080107 1310 -340 26 0
1 722.8 3
4.1 ...