similar to: Hello

Displaying 20 results from an estimated 5000 matches similar to: "Hello"

2008 Dec 09
3
difftime
Hi. I'm trying to take the difference in days between two times. Can you point out what's wrong, or suggest a different function? When I try the following code, The following code works fine: a <- strptime(1911100807,format="%Y%m%d%H",tz="GMT") b <- strptime(1911102718,format="%Y%m%d%H",tz="GMT") x <- difftime(b, a,
2011 Oct 25
2
difftime producing NA values in R 2.12.2
R-listers, I have noticed several posts on issues with difftime producing NA's but they have been for older versions of R. Here's the issue associated with difftime that I am dealing with in R 2.12.2. > preciptime = strptime("01/10/2007 14:00",format="%m/%d/%Y %H:%M") > class(preciptime) [1] "POSIXlt" "POSIXt" > # Now using difftime, this
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.
2008 May 14
1
Time differences (as.difftime?) issue
Dear all, I have a vector generated using the function strptime: > my.dt [1] "2004-04-19 08:35:00 W. Europe Daylight Time" "2004-04-19 09:35:00 W. Europe Daylight Time" "2004-04-19 11:35:00 W. Europe Daylight Time" [4] "2004-04-19 13:35:00 W. Europe Daylight Time" "2004-04-20 07:50:00 W. Europe Daylight Time" > class(my.dt) [1]
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
2010 Oct 29
7
date calculation
Hi list, Could someone explain to me why the following result is not a integer? > difftime(strptime("24NOV2004", format="%d%b%Y"), strptime("13MAY2004", >format="%d%b%Y"), units="days") Time difference of 195.0417 days I'm using R2.12.0 on WinXP. Thanks! ...Tao
2006 Mar 15
2
difftime arguments
Hi I just started using RGui.exe under widnows. I have a text file containing date arranged in columns and rows, each column has the same format, each row with different formats. 3 of the columns are something like this 1/12/2006 3:59:45 PM I need to calculate the different in seconds between 2 selected periods using their row’s index My solution: Read the file in a data frame and
2018 Aug 01
1
RFC: make as.difftime more consistent or convenient
Hello! you, Emil Bode <emil.bode at dans.knaw.nl>, wrote on Tuesday, July 31, 2018 1:55 PM: > Some of the changes you're proposing could be made (with effort), but note that you're not > restricted to providing strings with a format. > What you're trying to do can be accomplished with as.difftime(12, units='weeks'), see also > ?as.difftime > > Or if
2001 Nov 26
3
Doing things with POSIXt
Dear R-Users, I have a data file with timestamps and I wanted to use POSIXct time data type to represent the respective column. I played around with the type and found a couple of issues: * there seems to be no direct way of reading datetimes into a variable. Let's say this is my file "1992-02-27 23:03:20 PST" "1992-02-27 22:29:56 PST" "1992-01-14 01:03:30 PST"
2006 Jan 11
3
Datetimes differences
I want to obtain datetime differences in mins in an other column, in front of my datetimes. I have tried this : T1 <- c("12/31/03 23:49","1/1/04 1:14","1/1/04 0:02") T2 <- c("1/1/04 0:58","1/1/04 1:16","") toto <- data.frame(T1,T2) toto y <- strptime(T1,"%m/%d/%y %H:%M") x <- strptime(T2,"%m/%d/%y
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
2008 Nov 07
2
Unexpected behavior of clocktime related to daylight savings time
Colleagues, I submitted this several days ago and no one responded, so I am trying again, trying a different subject line: I just encountered some unexpected behavior of difftime in relationship to the change from daylight savings to standard time. My understanding is that DST and ST take effect at 2AM. However, the results below suggests that R (version 2.8.0 in OS X) implements the
2010 Feb 23
1
Problem with strptime generating missing values where none appear to exist
Dear R Helpers, I am having difficulty with strptime. I wish to find the differences between two vectors of times. I have apparently no difficulty to convert the vectors to the appropriate format using strptime. But, then difftime does not calculate all the differences. Here is the code and output:- dob=strptime(as.character(datx$BDT),'%d-%b-%y'); dob$year=dob$year-100
2009 Jun 10
2
isolating Hour and minute form date and time
Hi everybody. I have a dataframe that contains a factor with the date information in the format like in the example below: "2009/05/12 11:22:31 AM" I have been able to convert it to POSIXt using strptime Now I want to print only the date as one vector and the time in another vector but they must be real date and time classes so that i can use them in calculations to reconstruct my
2011 Feb 14
3
how to order POSIXt objects ?
I have a problem ordering by descending magnitude a POSIXt object. Can someone help please and let me know how to work around this. My goal is to be able to order my data by DATE and then by descending TIME. I have tried to include as much info as possible below. The problem stems from trying to read in times from a CSV file. I have converted the character time values to a POSIXt object using the
2019 Nov 25
2
Restar datetime, resultado erróneo
Buenos días, Tengo una lista de programas de televisión con sus horas de inicio y me gustaría encontrar la duración de cada uno. Para ello utilizo *strptime* para convertir las horas en formato *POSIXlt *y las resto con la función *difftime* . No tengo ningún problema salvo cuando un programa comienza antes de las 12 de la noche y termina después de la medianoche. Os pongo un ejemplo: horai
2008 Oct 13
2
Timestamps and manipulations
Hi All, I've a couple of questions i've been struggling with using the time features, can anyone help? sample data Timestamp user_id 27/05/08 22:57 763830873067 27/05/08 23:00 763830873067 27/05/08 23:01 763830873067 27/05/08 23:01 763830873067 05/06/08 11:34 763830873067 29/05/08 23:08 765253440317 29/05/08 23:06 765253440317 29/05/08 22:52 765253440317
2002 May 31
2
error in seq.POSIXt?
I am trying to extract only the winters (defined to be 01-Dec through 28-Feb) of daily data from 1948-2002. There are 90 days in each winter season. I wrote the following code to gather the winter dates into a single vector: DJF <- NULL for(year in 1949:1999) { temp.begin <- strptime(paste("01/12", year-1, sep="/"), "%d/%m/%Y") temp.end <-
2004 Nov 17
4
summary.lme() vs. anova.lme()
Dear R list: I modelled changes in a variable (mconc) over time (d) for individuals (replicate) given one of three treatments (treatment) using: mconc.lme <- lme(mconc~treatment*poly(d,2), random=~poly(d,2)|replicate, data=my.data) summary(mconc.lme) shows that the linear coefficient of one of the treatments is significantly different to zero, viz. Value Std.Error
2019 Nov 25
2
Restar datetime, resultado erróneo
Pues es buena solución, muchas gracias Álvaro. El lun., 25 nov. 2019 a las 10:25, Álvaro Hernández Vicente (<alvarohv en um.es>) escribió: > Pues lo más rápido quizá sea sumarle los minutos totales que tiene un > día a los que te salgan negativos. > > -1315 + 24*60 = 125 min > > Un saludo > Álvaro > > El 25/11/19 a las 9:36, Ruben Tobalina Ramirez escribió: >