Displaying 20 results from an estimated 5000 matches similar to: "Fwd: strptime() problem?"
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
2004 Aug 17
1
strptime() bug? And additional problem in package "tseries"
Hi all, I've got some problems with irts objects, one of which could be a bug:
1) Read a table with several columns from Postgres and the first column is
Timestamp with timezone (this is OK). An extract is:
raincida$ts:
[2039] "25/03/2000 22:00:00 UTC" "25/03/2000 23:00:00 UTC"
[2041] "26/03/2000 00:00:00 UTC" "26/03/2000 01:00:00 UTC"
[2043]
2011 Sep 19
2
fechas ??
Hola a todos:
Tengo un problema con las fechas, básicamente necesito una diferencia en días y siempre se sale en segundos. Salvo un ejemplo copiado de un libro, pero yo necesito procesar los datos propios. Les paso el código en R (copiar y pegar, son solo dos días que se comparan) y al final como me salen los resultados porque es medio complicada mi redacción.
¿Alguna idea?
fechas1
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 =
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
2015 Aug 04
2
Duda interpolación (package ' gstat ')
Hola,
# Hacemos el KED. Ver función "krige()":
KED.rad <- krige(
formula=pluvPcp~layer, # covariable -> radar
locations=lluvia.rad.pluv.spdf,
newdata=radarGrid, # podría ser cualquier objeto Spatial
model=v.fit, # modelo de semivariograma.
maxdist=Inf
2010 Jan 11
3
interpolation
Dear R-users,
I have a complex line by xy-values (ordered by z).
And I would like to get interpolated y-values on the positions of x = 0:600.
How do I get the correct points?
x=c(790,790,790,790,790,786,783,778,778,766,763,761,761,761,715,628,521,350,160,134,134,129,108,101,93,111,161,249,288,243,139,45,7)
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
2004 Aug 19
2
proposed change to [.POSIXct
R developers,
The "tzone" attribute is stripped from a POSIXct object when the subscript
command is called ("[.POISXct"). This results in dates being printed in the
locale specific format after a subscript operation is applied to a POSIXct
object which has cause several problems for me in the past.
Here is an example of this problem under R 1.9.1:
> x <-
2005 May 11
2
time zones, daylight saving etc.
Hi, I have a whole bunch of data, which looks like:
15/03/2003 10:20 1
15/03/2003 10:21 0
15/03/2003 12:02 0
16/03/2003 06:10 0
16/03/2003 06:20 0.5
16/03/2003 06:30 0
16/03/2003 06:40 0
16/03/2003 06:50 0
18/03/2003 20:10 0.5
etc. (times given on a 24 hour clock)
and goes on for years. I have some code:
2015 Aug 06
2
Duda interpolación (package ' gstat ')
Sale plano sí.
Ya se que sin tener los datos y el código es un poco difícil, pero es que mis datos ocupan mucho, es imposible.
Seguiré mirando por internet.
Muchas gracias Rubén.
Un saludo,
> To: r-help-es en r-project.org
> From: rubenfcasal en gmail.com
> Date: Thu, 6 Aug 2015 14:21:47 +0200
> Subject: Re: [R-es] Duda interpolación (package ' gstat ')
>
> Hola
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
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
2012 Dec 19
4
How to convert xts data into list
Hello,
How can I convert Close colume of the below xts time series data into a list of Close values ?
I'd like to plot Close values as a list.
> head(zc)
Close
(10/15/12 09:00:00) 252.40
(10/15/12 09:01:00) 253.10
(10/15/12 09:02:00) 253.15
(10/15/12 09:03:00) 253.30
(10/15/12 09:04:00) 253.25
(10/15/12 09:05:00) 253.45
I tried the below command to plot it.
2009 Jul 19
1
transform(_data,...) using strptime gives an error
I have timstamped data like this:
> sd[1:10,]
Tstamp Density Mesh50 Mesh70 Mesh100 Mesh150 Mesh200
2 2009/02/27 07:00 30.5 0.7 10.7 21.4 32.8 41.6
3 2009/02/27 08:00 32.2 1.6 12.4 23.3 34.5 43.0
4 2009/02/27 09:00 32.7 4.8 13.0 24.0 35.1 43.5
5 2009/02/27 10:00 26.7 0.3 6.5 17.6 28.1 36.9
6 2009/02/27 11:00
2008 Mar 20
3
Problem with diff(strptime(...
Hi all,
I have been chipping away at a problem I encountered in calculating
rates per year from a moderately large data file (46412 rows). When I
ran the following command, I got obviously wrong output:
interval<-
c(NA,as.numeric(diff(
strptime(mkdf$MEAS_DATE,"%d/%m/%Y")))/365.25)
The values in MEAS_DATE looked like this:
mkdf$MEAS_DATE[1:10]
[1] 1/5/1962 1/5/1963
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 Oct 28
2
POSIX time anomaly (PR#7317)
Full_Name: Allen McIntosh
Version: 2.0.0
OS: RedHat 9.0
Submission from: (NULL) (67.80.175.118)
The POSIX time printing routine gives strange results when asked to print a time
that is exactly midnight:
TZ=CST6CDT R -q --no-save
> strptime("10/5/2004 00:00:01 CDT", "%m/%d/%Y %H:%M:%S %Z")
[1] "2004-10-05 00:00:01"
> strptime("10/5/2004 00:00:00
2008 Oct 03
1
Problem with strptime
Hello,
I have a column with dates in the form %Y-%m-%d %H:%M:%S; I want to substract the line i+1 to the line i and get a numeric result (in seconds for instance).
This is what I did (I take the data from a database):
res<- dbSendQuery (con, "SELECT Date_Heure FROM data.meteo ")Time<-fetch(res, n=-1)TimeDifferencetime<-as.numeric(diff(strptime(Time, format='%Y-%m-%d
2009 Sep 02
4
diff of two timestamps
Hi all,
I have the following problem: I have a csv-file consisting of timestamp
values (no dates), e.g.:
Timestamp1;Timestamp2;
05:24:43;05:25:05;
15:47:02;15:47:22;
18:36:05;18:36:24;
15:21:24;15:22:04;
I need a vector with the difference of the two timestamps, so I read the
data with the read.csv-function:
myObj <- read.csv("file.csv",header=TRUE,sep=";").
I have then