Displaying 4 results from an estimated 4 matches for "19e6l".
Did you mean:
1966l
2009 Jul 11
2
Date conversions
...t;,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:\\Date2.txt",header=TRUE)
>
> MyDate1
Date...
2009 Aug 28
2
new data.frame summed by date
...a.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")
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,...
2009 Jul 04
1
Date code conversion
Hi,
Is there a function that will convert this sort of date code which
looks like "years from 1900 + month_number + day_number" with no
spaces? As an example Jan. 3rd 2008 would be written as 1080103.
Thanks,
Mark
2011 Feb 09
1
Iterate over a list of input files?
...ode. What I need to
do is run it on all the files in the directory tested and augment the
data frame I'm building to have more results columns.How can I do
that?
Here's the code:
library(chron) # .Holidays / is.holiday / is.weekend
TStoDate = function (TSDate) {
X = strptime(TSDate + 19e6L, "%Y%m%d")
return(as.Date(X))
}
FirstDate = 1090601
LastDate = 1101101
StartDate = TStoDate(FirstDate)
EndDate = TStoDate(LastDate)
# Create a sequence of days from start to finish
# Then remove weekends and holidays and turn into a data.frame
dd <- seq(StartDate, EndDate, by = &q...