Displaying 7 results from an estimated 7 matches for "timesequ".
Did you mean:
timeseq
2011 Jan 06
5
Problem with timeSequence {timeDate} - wrong end date
Dear help-list,
I have a problem with timeSequence {timeDate}.
When I use it like
> timeSequence(from = "2008-01-01", to = "2010-12-13", by = "1 month")
GMT
[1] [2008-01-01] [2008-02-01] [2008-03-01] [2008-04-01] [2008-05-01]
[2008-06-01] [2008-07-01] [2008-08-01] [2008-09-01] [2008-10-01]
[2008-11-01]
[12] [...
2006 Jul 06
2
use of apply in a data frame on a row by row basis
...et "character(0)" )
Though : myfun(df[1,]) works,
and myfun(df) works as well.
So if myfun(df) works, that's fine!
BUT, if the output of the function a bit more complex, it does not work :
In this case I'm using a timeSeries object (from Rmetrics)
library(fMultivar)
timerange = timeSequence(from = "2001-04-11", length.out = 3,by = "weeks",
format = "%Y-%m-%d", FinCenter = "GMT")
myfun2 = function(x) timeSeries(rnorm(3),timerange)
In this case, myfun2(df) returns only the result of the 1st row!
BUT
apply(df,1,myfun2) in this case, does work...
2006 Jun 01
1
date sequencing using the Fcalendar package
I am using the following command from the Fcalendar Package :
x = timeSequence("1992-12-31","1994-12-31")
and then y = as.character(x) is a vector of character strings
"[1] 1992-12-31" "1993-01-31" "1993-03-03" "1993-03-31" "1993-05-01" etc
This is very close to what I need and thank you very much
t...
2008 Sep 11
5
How to obtain a sequence of dates consisting of only weekdays
Dear R-users,
How do I obtain a sequence of dates consisting of only weekdays without the weekends in R?
In S, I can do the following:
timeSeq(from="12/17/2007", to="8/25/2008", by="weekdays")
I tried using looking at timeSequence (fSeries package) and seq.Date (base package) but I do not know if I can specify "weekdays" rather than "day".
Hope to have some assistance.
Thank you!
Regards,
wy
**********************************************************
The information provided in this e-mail is conf...
2004 Nov 06
1
calendar-based time-series in R
Hello,
I am trying to switch to R from S-PLUS 6.1, and one problem I am having is
using R for manipulation of calendar-based time-series. In S-PLUS, I
commonly use the functions timeSequence(), timeDate(), and timeSeries() to
align/average/aggregate data; and I also do a lot of plotting of
time-series data (with calendar-based labels on the x-axis).
I was wondering if anyone is familiar with the S-PLUS functions and ways
to perform the same tasks I mentioned above in R. From wh...
2009 Sep 11
0
Rmetrics timeDate - business days between dates
...f class Date.")
}
if(class(holidays) != "function"){
stop("holidays must be a function")
}
if(start > end){
stop("start date must not be greater than end date.")
}
y1 <- as.POSIXlt(start)$year + 1900
y2 <- as.POSIXlt(end)$year + 1900
seqs <- timeSequence(from = start, to = end, by = "day")
ndays <- length(seqs)
dts <- NULL
temp <- NULL
if( y1 == y2){
temp <- window(holidays(y1), start = start, end = end)
dts <- seqs[isBizday(seqs,temp)]
}else{
temp <- holidays(y1)
for(k in seq(from = y1+1, to =...
2009 Aug 04
0
Efficient coding
...ntID", sp, "has more than one demand time Series. Used first."))
tsrValCount <- getTimeSeries(chn, tsrSUB[!is.na(tsrSUB$cDeviceClass),]$cTimeSeriesID, nDaysBack = 366*nyears)
tsrValDmnd <- getTimeSeries(chn, dmnd$cTimeSeriesID[1], nDaysBack = 366*nyears)
sequence <- timeSequence(from = format(start(tsrValDmnd), '%Y-%m-%d'), to = format(end(tsrValDmnd), '%Y-%m-%d'), by = 'day')
if(format(start(tsrValDmnd), '%H') != '00')
tsrValDmnd <- window(tsrValDmnd, sequence[3], end(tsrValDmnd))
if(format(end(tsrValDmnd), '%H...