similar to: Time Series

Displaying 20 results from an estimated 20000 matches similar to: "Time Series"

2007 Dec 14
3
How to convert Datetime numbers from Excel to POSIXt objects
Hi all, I need to compare time series data files of different time formats. I had no problems with text format using strptime. But how can I convert datetime numbers from Excel (days since 30.12.1899 00:00:00) into POSIXt objects? For example 29770.375 should be converted to "03.07.1981 09:00:00" I tried the following code and encountered strange results: t1-t0 gives 29770.33
2004 May 19
2
POSIX to ts and back to POSIX
I am trying to use POSIX datetime objects rather than chron datetime objects but am having difficulty with POSIX in a time series. My question: Once a POSIXct vector is bound to a time series, is there a function to convert back to POSIXct? The following code demonstrates what I am trying to do. > ts(as.POSIXct(strptime(tmp,"%m/%d/%Y %H:%M:%S")),freq=1440) Time Series: Start =
2010 Feb 16
3
converting character vector "hh:mm" to chron or strptime 24 clock time vectors
Hi All, I am attempting to work with some data from loggers. I have read in a .csv exported from MS Access that already has my dates and times (in 24 clock format), (with StringsAsFactors=FALSE). > head(tdata) LogData date time 1 77.16 2008/04/24 02:00 2 61.78 2008/04/24 04:00 3 75.44 2008/04/24 06:00 4 89.43 2008/04/24
2002 Apr 08
1
Problem(?) in strptime() -- short version
I decided my earlier email on this topic was rather long and wordy; here's a condensed version. I am sitting at a Solaris computer in the US/Pacific timezone. I have a file of data having times that includes the following three values 2002-4-7 1:30:00 GMT 2002-4-7 2:30:00 GMT 2002-4-7 3:30:00 GMT I have not been able to find a way to correctly convert these to either of the POSIX
2004 Aug 17
3
Fwd: strptime() problem?
Hi all; I've already send a similar e-mail to the list and Prof. Brian Ripley answered me but my doubts remain unresolved. Thanks for the clarification, but perhaps I wasn't clear enough in posting my questions. I've got a postgres database which I read into R. The first column is Timestamp with timezone, and my data are already in UTC format. An 'printed' extract of R
2004 Aug 18
1
Fwd: strptime() problem? - Resolved
Hi Gabor and everybody; Thanks Gabor, with the alternative step you've told me the problem is resolved. Comparing the two procedures: Extract from the source 'character' data: > rain$ts[2039:2046] [1] "25/03/2000 22:00:00 UTC" "25/03/2000 23:00:00 UTC" [3] "26/03/2000 00:00:00 UTC" "26/03/2000 01:00:00 UTC" [5] "26/03/2000 02:00:00
2009 Sep 20
2
Date/Time to date & time
Hi, Can strptime (or some other function) help me turn the following column of a data.frame into two new columns, one as date and the other as time, preserving the AM/PM value? Thanks, Mark > B ENTRY DATE 1 3/23/2009 6:30:00 AM 2 3/23/2009 6:30:00 AM 3 3/23/2009 6:39:00 AM 4 3/23/2009 6:39:00 AM 5 3/23/2009 6:48:00 AM 6 3/23/2009 6:48:00 AM 7 3/23/2009 7:00:00 AM
2007 Jun 20
1
making a Time of Day axis
I am wrestling with time and date data. I came up with a way to plot and label a histogram with "time of day" on the x-axis, but it seemed like a lot more work than should be necessary. Is there a better way to do what I am trying to do? require(chron) # read input data data = read.table("input.dat", header=T) # Create date-time and chron objects datetime =
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
2003 Oct 17
7
datetime data and plotting
If I take the following simple data: YEAR MONTH DAY WEIGHT.KG 2003 10 6 1.2 2003 10 12 1.2 2003 10 16 1.3 and format the date data and plot it: dates <- strptime(paste(DAY,MONTH,YEAR),"%d%m%Y") plot(c(min(dates),max(dates)),c(0,max(WEIGHT.KG)), xlab="Date",ylab="Weight (kg)",type="n") lines(dates,WEIGHT.KG) points(dates,WEIGHT.KG) I find that the
2006 May 30
3
Time rather than dates?
Using strptime() and other functions for dates has been very helpful with the kind of data I often work with. However, I haven't found out how time as such should be specified. All my attempts result in time *and* date: >treatment_time<-c("01:02:03","02:03:04") # hours:minutes:seconds >time.2<-strptime(treatment_time,format="%H:%M:%S") >time.2 [1]
2008 Dec 29
1
Trouble installing plyr
I want to learn how to use the reshape package. The reshape package is not included in the Ubuntu repositories, so I attempted to install reshape with: install.packages("reshape") This is what I got for output: Warning in install.packages("reshape") : argument 'lib' is missing: using '/home/andy/R/i486-pc-linux-gnu-library/2.7'
2007 Aug 29
1
Strage result with an append/strptime combination
Hi, I keep on trying to write some small scripts in order to learn R but even with basic scripts I have problems ... I start with the name of a file which is in fact the time the file has been generated (I cannot change the format). Then I convert namefile with strptime. The problem occurs when I add another time from another file with append. It displays some informations I don't want. I
2007 Apr 04
1
time zone problems
Folks, I'm having trouble with how datetime objects with time zones are set and plotted. This may be the result of my running R (2.4.0) on a Windoze XP box. Perhaps not. Here are two example problems I need advise on if you have time: 1) I collect data with dates (often as a fractional day of year) in UTC. Using strptime to create date time objects appears to force the data into
2004 Sep 03
2
strptime problems
Hi, I'm experiencing a problem with strptime. (R 1.9.1 on a Win2000 machine) I have a large list containing 6 columns and 161800 rows. One column contains dates that I want to convert in order to compare the different dates. Some dates work just fine while others become NA. I don't see any difference between the dates. I've attached an example from my code. Hope this explains my
2007 Apr 05
1
Extent of time zone vulerability for POSIX date and time classes
Hi. I frequently convert date and time data to and from character representations. I'm frustrated with chron, because 'seconds' are required to create a time object (my input data never has seconds). More importantly, I cannot make chron print the format 12/30/2006 (which my output data requires). I really like the format flexibility of strftime() and strptime(), but of course
2008 Aug 01
1
chron objects: input/output
Hi list, I have some questions regarding 1) conversion of date + time characters to chron 2) formatting chron object printing Regarding (1), Gabor's Rnews 2004 4/1 article has been indispensible, but I often work with files where dates and times are contained in a single field. In this case, I would like to control input/output of chron objects when each observation of date and time is
2008 Dec 01
1
How to make a banner table.
I have a dataframe with the following variables: idnum area gender race etc. I would like to make a table that looks like area gender race M F B W A 1 4 5 3 5 1 2 6 7 4 6 3 etc. Basically, I want to make a single broad table with a number of sub-set tables. I have tried: cbind(table(area, gender), table(area, race)) But, when I do this, I lose the labels gender / race. This makes it
2003 Dec 15
2
Week of the Year date conversion
Hello there fellow R-users, I have received some data which comes in the following format: example1<-"200301" The first 4 digits correspond to the year and the remaining 2 digits correspond to the week of the year. I have tried to convert this to a date by using strptime as follows: strptime(example1,format="%Y%U") where U (looking up strptime) is the week of the
2009 Oct 05
6
Date-Time-Stamp input method for user-specific formats
Date-Time-Stamp input method to correctly interpret user-specific formats:coding is 90% there - based on exmple at http://tolstoy.newcastle.edu.au/R/help/05/02/12003.html ...anyone got the last 10% please? CONTEXT: Data is received where one of the columns is a datetimestamp. At midnight, the value represented as text in this column consists of just the date part, e.g.