similar to: Treatment of Date ODBC objects in R (RODBC)

Displaying 20 results from an estimated 10000 matches similar to: "Treatment of Date ODBC objects in R (RODBC)"

2002 May 21
1
I() fails on objects of class POSIXct (PR#1587)
Although the documentation is somewhat sketchy, I() can be used to create objects of class AsIs: > I("a") [1] "a" attr(,"class") [1] "AsIs" "character" > I(4) [1] 4 attr(,"class") [1] "AsIs" "numeric" > I(4 + 0i) [1] 4+0i attr(,"class") [1] "AsIs" "complex" > This
2005 Jan 31
4
aggregating dates
I have a frame which contains 3 columns: "date" "defectnum" "state" And I want to get the most recent state change for a given defect number. date is POSIXct. I have tried: aggregate(ev$date, by=list(ev$defectnum), max) Which appears to be working except that the dates seem to come back as integers (presumably the internal representation of POSIXct). When I
2004 Nov 11
2
RODBC & POSIX & Daylight Saving blues
Dear All, The recent improvement in RODBC to recognize datetimes in tables has exposed my ongoing confusion. All my data are obtained from a satellite system (Argos) which tags events in the GMT time zone. Daylight saving is ignored. To my way of thinking this means that 1. twelve-o-clock means halfway through the day regardless of season, and 2. the difftime of any two dates where
2003 Dec 04
5
Processing calendar dates with R
I am a beginner in R with a background in SAS. Are there built-in R methods of reading dates for calculating elapsed days between two calendar dates? If so, are there any examples I can browse? Thanks in anticipation. John Byrne. Lecturer in Information Systems. Australian Catholic University.
2002 May 28
2
histogramming dates
I'd like to make a plot showing frequency of an event. The data is in a data from that includes Year, Month and Day (of month) fields, so I created a Date with ISOdate(Year, Month, Day, tz=''). I can plot frequencies for the year 2002 with > thisyear <- Date[Year==2002] > hist( thisyear, xaxt='n' ) > axis.POSIXct( 1, at=seq(min(thisyear), max(thisyear),
2004 Mar 05
3
as.POSIXct problem
Hi all, I'm having difficulty converting a 'dates' object to a POSIXct object: testDATES<-c(35947,35971,36004,36008,36053,36066) testDATES<-chron(dates=testDATES, format = c(dates = "m/d/y"), origin=c(month = 12, day = 30, year = 1899)) >[1] 06/01/98 06/25/98 07/28/98 08/01/98 09/15/98 09/28/98 > as.POSIXct(testDATES) [1] NA NA NA NA NA NA
2006 Apr 10
3
timeAlign
I use POSIXct for datetimes. Is thee a timeAlign function that I can use where : align by year direction -1 ==> start of this year direction 1 ==> start of next year align by week direction -1 ==> date on last sunday direction 1 ==> date on next sunday align by day direction -1 ==> time at past midnight direction 1 ==> time at this comming
2011 Aug 08
2
RODBC: sqlUpdate doesn't handle properly POSIXct field?
Hello all! Can someone confirm whether there is a bug or not? I was trying to use sqlUpdate in place of sqlSave as data set I import has duplications. However I get errors while using fast=FALSE argument to safely update/ignore duplicates: Error while executing the query[RODBC] ERROR: Could not SQLExecDirect 'UPDATE "data" SET "logger"=1,
2008 Apr 10
1
ISOdate/ISOdatetime performance suggestions, other date/time questions
Dear list: working with date/times I have come across a problem that ISOdate and ISOdatetime are too slow on large vectors of data. I was surprised just until I looked at the implementation and the man page: "ISOdatetime and ISOdate are convenience wrappers for strptime". In other terms, they convert data to character representation first in order to create a POSIXlt object that is then
2005 Apr 22
2
help with POSIX
For the r script below >datestr <- "01/01/2004" >as.POSIXct(as.Date(datestr, "%d/%m/%Y")) I get the following output "2003-12-31 18:00:00 Central Standard Time" Why is the date a day before. I guess its something to do with the time, but is there a way to get it to return 2004-01-01 instead? Thanks in advance... -Sandeep [[alternative HTML version
2010 Apr 29
1
image function with date-time on X axis
I am trying to plot a image where the x axis has the units of time. When I issue the image(x,y,z) command with x as a POSIXct object, it fails to put a time stamp on the x axis. Instead I get a warning "Incompatible methods" warning and no dates on my x axis. This example shows my problem: Rmat=t(matrix(data=rnorm(1:500),ncol=10,nrow=50)) tax=seq(ISOdate(2010,4,14,12,0,0),
2009 Apr 07
4
Re ading Excel 5.0 files with RODBC?
Hi, i'm trying to read some data from excel files but it seems that neither xlsReadWrite nor sqlFetch (RODBC) doesn't like the format (Excel 5.0). When i open the file in Excel and save it in a new format Excel 97 -2003 everything works fine. Is it possible to use ODBC connection to open old format files, or i guess i will have to open and save every file in Excel in new format, which
2007 Jan 24
1
RODBC
Hello, I am fairly new to R and its connectivity to MS-Access. I just installed RODBC and it seems to be working well except when I use the date to condition the query. For example the query below sqlQuery(channel, "select date from tblUScpi where (date > d2) order by date") returns the following error [1] "[RODBC] ERROR: Could not SQLExecDirect"
2009 Jul 20
1
Problem with as.POSIXct on dates object
Dear R-helpers, I have a problem converting an object made with the 'chron' function to a POSIXct object: # Make date based on DOY dat <- chron(dates=232, origin.=c(month=1, day=1, year=2008)) dat #[1] 08/20/08 # Converting to POSIXct uses current timezone (Sydney): as.POSIXct(dat) #[1] "2008-08-20 10:00:00 EST" # Setting GMT timezone has no effect? as.POSIXct(dat,
2008 Mar 25
5
reading Excel file
Hi R, I have an excel file in which the third column is "date" and others are "character" and "numeric". Number of columns are 12 If I use this to read the file in R: x = read.xls("D:\\file.xls") The problem is that my date column is read in julian dates. So I am using: x = read.xls("D:\\file.xls",
2002 Oct 17
4
Posix Problem, difftime
I am having a series of problems using date time data that has been converted into a POSIXt and POSIXlt classes. I have hourly time series data from 1900 that has been converted from text data. I assume most of my problems come from a mis-underdanding of the POSIX class. My matrix named (aa) for this year is approx 8700 by 4. When I try to calculate the length of posit column ( which is the
2003 Apr 30
2
ylab in plot.POSIXct
I am using R-1.7.0 and have some data which consist of one vector of numbers and a second corresponding vector of dates belonging to the POSIXct class. I would like to plot the numbers against the dates. What is the best way to do this? It almost works to just call `plot.' However if I do this while using the `ylab' parameter I get a warning message: parameter "ylab"
2003 Sep 07
4
data manipulation
Hi, I am new to R, coming from a few years using Stata. I've been twisting my brain and checking several R and S references over the last few days to try to solve this data management problem: I have a data set with a unique patient identifier that is repeated along multiple rows, a variable with month of patient encounter, and a continous variable for cost of individual encounters. The data
2003 Nov 19
5
ISOdate returns incorrect date?
Dear all, I have found the following (for me) incomprehensible behaviour of ISOdate (POSIXct): > ISOdate(1900,6,16) [1] "1900-06-15 14:00:00 Westeurop?ische Sommerzeit" > ISOdate(1950,6,16) [1] "1950-06-16 14:00:00 Westeurop?ische Sommerzeit" Note that in the first case I get the 15th of June back, not the 16th as I would have expected! This happened under R-1.7.1 on
2005 Dec 19
3
given a mid-month date, get the month-end date
I have a vector of dates. I wish to find the month end date for each. Any suggestions? e.g. For 12/15/05, I want 12/31/05, For 10/15/1995, I want 10/31/1995, etc __________________________________________________ [[alternative HTML version deleted]]