search for: timedate

Displaying 20 results from an estimated 122 matches for "timedate".

2008 Sep 09
1
'xtfrm' performance (influences 'order' performance) in R devel
...ch) S4 methods for a given S4 class degrades the performance of xtfrm (used in 'order' in new R-devel) by a factor of millions. This is for classes that ARE derived from numeric directly and thus should be quite trivial to convert to numeric. Consider the following example: setClass("TimeDateBase", representation("numeric", mode="character"), prototype(mode="posix") ) setClass("TimeDate", representation("TimeDateBase", tzone="character"), prototype(tzone="London") ) x = new("TimeDate",...
2007 Nov 02
1
R timeDate does not allow seconds?
...s message twice, as my mailserver may not be working. Thanks for your response. Your idea makes a lot of sense to me, but I've been unable to get seconds to work. I ended up with this format finally: "2007-10-31_16:20:22" Problem is I am unable to get it recognized as a date using timeDate(): R> timeDate(as.character(inputdate),format="%Y-%02m-%02d_%02H.%02M.%02S") Error in if (regexpr("/....", charvec[1])[[1]] > 0) return("%m/%d/%Y") : missing value where TRUE/FALSE needed The R-help archives said something about non-standard formats cas...
2009 Jan 27
2
Can I create a timeDate object using only year and week of the year values?
...basic sample data, but I require a value representing the amount of time since the sample was taken (actually, for the purpose of the model, it is sufficient to use the number of weeks from the middle of the sample week to the present). What I have found so far includes: library(Rmetrics) time1 = timeDate(charvec = Sys.Date(), format = "%Y-%m-%d", zone = "", FinCenter = "") time2 = timeDate("2004-08-30", format = "%Y-%m-%d", zone = "", FinCenter = "") difftimeDate(time1,time2,units = "weeks") Does timeDate use the form...
2011 Jul 19
2
timeDate with month designated by three letters.
Dear R Experts: I am trying to convert a date and time character field to timeDate where the month is presented as three letters, such as "JUN" for June, etc. This is an example of the full character field: "04-MAY-11 1428" What is the proper format syntax? I've tried timeDate("04-MAY-11 1428",format="%d-%m-%y %H%M") but only ge...
2005 Apr 19
1
timeSeries Date Warning messages: Set timezone to GMT!
...ust be doing something wrong that's very obvious. But I just don't see it. I changed my Windows Time Zone to GMT and my Financial Center to Montreal. But I still get several warnings. >Sys.timezone() [1] "GMT Daylight Time" >myFinCenter [1] "Montreal" >Sys.timeDate() [1] "Montreal" [1] [2005-04-19 10:55:02] Warning messages: 1: Set timezone to GMT! in: Sys.timeDate() 2: Set timezone to GMT! in: timeDate(as.character(Sys.time()), zone = "GMT", FinCenter = FinCenter) 3: Set timezone to GMT! in: rulesFinCenter(FinCenter) 4: Set timezone to G...
2009 Mar 13
1
Rd \usage clause for an S4 replace method
Given S4 methods [ and [<-, how do I write the Rd-file usage clause for the latter one? What I have now is: \S4method{[}{TimeSeries,TimeDate,missing}(x, i, j, ..., drop) \S4method{[<-}{TimeSeries,TimeDate,missing,ANY}(x, i, j, ..., value) which results in the following output: ## S4 method for signature 'TimeSeries, TimeDate, missing': x[i, j, ..., drop] \S4method{[<-}{TimeSeries,TimeDate,missing,ANY}(x, i, j...
2008 Oct 21
2
For loop - how to assign "i" when it is not an element of an index?
Hello, I'm trying to build a for loop, where I estimate a series of models with different sets of (time series) data. However my for loop doesn't recognize the "i" ##################### code################ window.1=anomalies.CAK[(positions(anomalies.CAK)>=timeDate("1/1/1971") & positions(anomalies.CAK)<=timeDate("6/30/1991") )] .... window.14=anomalies.CAK[(positions(anomalies.CAK)>=timeDate("1/1/1984") & positions(anomalies.CAK)<=timeDate("6/30/2004") ),] for (i in 1:14){ ar1mods[1] = lm ( formula =...
2009 Mar 05
1
Problem using RMySQL and fCalendar
...library(fCalendar, pos=2) # For date math Loading required package: MASS Loading required package: fUtilities Rmetrics Package fUtilities (290.76) loaded. Loading required package: fEcofin Rmetrics Package fCalendar (270.78.2) loaded. The new version of 'fCalendar' has been renamed to 'timeDate' > dt<-"1947-06-13" > myFC<-"America/NewYork" > DT<-timeDate(dt, zone=myFC, FinCenter=myFC) > DT + 3600 America/NewYork [1] [1947-06-13 01:00:00] > library(RMySQL, pos=4) # For db access > DT + 3600 Error in `+.timeDate`(DT, 3600) : no s...
2007 Mar 12
1
timeDate & business day
....g. ymd [1] 20050104 20050105 20050106 20050107 20050110 20050111 20050113 20050114 [9] 20050118 20050120 20050121 20050124 20050125 20050126 20050127 20050128 [17] 20050201 20050202 20050203 20050204 Now, I'd like to compute statistics, e.g. acf, by business days. So, I try to convert it into timeDate class. But, when I try to change date format, this is what I am getting: > tt = timeDate('20050101',format=c('%Y%m%d'),FinCenter='GMT') > unclass(tt) list() attr(,"Data") [1] "2005-01-01" attr(,"Dim") [1] 1 attr(,"format") [1] &q...
2010 Dec 16
0
Problem wiht mvbutils and timeDate in R 2.12
...NULL)   print(ts1)   library(mvbutils)   ts2 = timeSeries(1:10, cv1, units = NULL)   print(ts2) print(ts1) # Both objects have problems --------------   This is the error message generated when printing the timeSeries after loading mvbutils:   Error in validObject(.Object) :   invalid class "timeDate" object: 1: invalid object for slot "Data" in class "timeDate": got class "POSIXt", should be or extend class "POSIXct" invalid class "timeDate" object: 2: invalid object for slot "Data" in class "timeDate": got class &quot...
2004 Nov 22
7
timeDate
what package should I include to use timeDate? I want to convert a double (num of millis) into date object.
2006 May 31
2
timeSeq and TimeDate analog in R ?
Hi All : I am attempting tomove a large amount of code from Splus to R and I was hoping that there was an equivalent in R of the Splus functions timeSeq and timeDate ? I did an RSiteSearch but nothing came up ? If the equivalent functions are part of some package, that's fine. Thanks a lot. Mark
2002 Jul 11
2
Control Panel
Anybody know how to invoke control panel applets? What I really want to do is make Wine use my default Date format that I used in Windows, but it's reverted to the goddawful American usage (with two digit years, no less). wine timedate.cpl (or wine C:/windows/system/timedate.cpl) fails with an error 193 and nothing in the log -- derek
2007 Aug 20
2
library(fCalendar) timeDate("12.03.2005",format="%d.%m.%Y")
Dear R users, I have problem with the library fCalendar. I am not using the US standard format notations. It seems like it is not possible to have different format than the US standards. Anyone how knows a way to go around this problem? Here is the code I enter: myDate = "12.03.2005" timeDate(myDate, format = "%d.%m.%Y") And I get following error message: Error in if (sum(lt$sec + lt$min + lt$hour) == 0) isoFormat = "%Y-%m-%d" : missing value where TRUE/FALSE needed Thanks, Ola
2009 Sep 11
0
Rmetrics timeDate - business days between dates
Hi One of the most important calculation in applied finance is the number of days between dates. That kind of calculus become annoying when a specific calendar must be used. That is the case for the business days calculus. The package timeDate has a function isBizday to perform that kind of thing. The problem is that using this function to calculate the number of business days between dates has taken a very long time. An example of such an implementation is the function below. Has anyone an optimized function to to this counts? Clearl...
2011 Feb 11
2
tzone and DST
...f data that includes hourly timestamps. Presumably to avoid DST confusion, all the data is in PST time zone -- no discontinuities in the spring or fall. The data comes in a csv file, which I'm reading with myvariable <- read.csv("my_data_file.csv",header=FALSE, col.names=c("timedate","values"),colClasses=c("POSIXct","numeric")) The time zone comes in as PST or PDT, as appropriate. That leads to problems in the spring: > temps$timedate[2185:2190] [1] "2006-04-02 00:00:00 PST" "2006-04-02 01:00:00 PST" [3] NA...
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] [2008-12-01] [2...
2004 Mar 07
2
Excel files
Hello, I was trying to import data from an Excel file. After I imported the data, I was trying to make a scatter plot. The X axes variable is a time variable, which occupies two columns, one is date, another one is time. Example 21-Apr-03, 4:10 PM. My qestion is: 1. How can I access the data of certain column? I mean how can I refer it in R? 2. How can I make the two column character
2011 Aug 01
1
Identifying US holidays
...am not using it properly: library(chron) is.holiday(chron) # Says that none of those dates are holidays ?is.holiday says: "holidays" is an object that should be listing holidays. But I want to figure out which of my dates are US holidays and don't want to provide a list of Package timeDate does almost what I need: library(timeDate) holidayNYSE(2008:2010) holidayNYSE() However, I don't need all the NYSE holidays (like Good Friday). Just the major US holidays - New Years, MLK, Memorial Day, Independence Day, Labor Day, Halloween, Thanksgiving, Christmas. Is there any way to identi...
2009 Oct 23
2
extract day or month as in Splus
Dear all, I am writing to ask for help to find R code to do the same thing as the following Splus code: dates <- c("02/27/1992", "02/27/1992", "01/14/1992", "02/28/1992", "02/01/1992") timeDate(as.character(dates),in.format="%m/%d/%Y","%a") [1] Thu Thu Tue Fri Sat Could anyone give me some R codes to get the same results as above(extract days from dates), please? Thanks in advance! Betty [[alternative HTML version deleted]]