search for: ymd_hms

Displaying 20 results from an estimated 22 matches for "ymd_hms".

2013 Oct 04
2
Possible POSIXlt / wday glitch & bugs.r-project.org status
...pect the wday element to be invariant to the timezone of a date. That is, the same date/time instant of 5th October 2013 in both Australia/Sydney and UTC should be a Saturday (i.e. wday = 6). And indeed that is the case with 1 min past midnight on 5 October 2013: ``` library(lubridate) d_utc <- ymd_hms(20131005000001, tz='UTC') d_local <- ymd_hms(20131005000001, tz='Australia/Sydney') as.POSIXlt(x=d_utc, tz=tz(d_utc))$wday # 6 as.POSIXlt(x=d_local, tz=tz(d_local))$wday # 6 ``` But this isn't always the case. For example, ``` d_utc <- ymd_hms(20381002000001, tz='UTC...
2020 Jan 02
2
Como cambiar el formato de fecha de ymd_hms a dmy_hms
Buen día para todos, Tengo un dataframe nombrado como mydata en donde una de sus variables en columna de nombre *date* tiene una secuencia de fechas en formato *ymd_hms*. Ahora quiero convertir este formato a *dmy_hms * en toda la variable *date.* Me podrían ayudar a saber como debo hacerlo? Quedo atento a sus comentarios. Saludos, Gracias, *JONATHAN BARTOLO PINZON * *"En los momentos de crisis, sólo la imaginación es más importante que el conocimient...
2011 Feb 11
2
tzone and DST
...;2006-04-02 00:00:00 PST" "2006-04-02 01:00:00 PST" [3] NA "2006-04-02 03:00:00 PDT" [5] "2006-04-02 04:00:00 PDT" "2006-04-02 05:00:00 PDT" I presume it gets PST/PDT from my (Windows) system; I can't set it with > force_tz(ymd_hms("2007-03-11 01:00:00"),tzone="PST") (from the lubridate package), but see > force_tz(ymd_hms("2006-04-02 01:00:00"),tzone="America/Los_Angeles") [1] "2006-04-02 01:00:00 PST" What I'd like to do is keep all the time in standard time so I do...
2016 Sep 27
2
Error al buscar datos saltados
Hola, El problema que tienes es en esta sentencia: ymd_hms(TEM$TIMESTAMP) No la estás asignando a nada. Lo suyo es que hagas algo así: TEM$myTimeStamp <- ymd_hms(TEM$TIMESTAMP) Y crees el intervalo (seq...) on esta nueva variable. El error que obtienes es que "TEM$TIMESTAMP" al leerla del fichero es un string, pero en la lectura automática...
2014 Sep 25
4
Campo Fecha y paquete openair
Sorry, la función por el formato que tienen tus fechas debe de ser "dmy_hms()"... Saludos, Carlos Ortega www.qualityexcellence.es El 25 de septiembre de 2014, 18:14, Eduardo Bieñkowski <edukoski en gmail.com> escribió: > Si lo proceso con date<-ymd_hms(dato$actualizado) no me da error pero la > transformación no es la correcta > > > head(dato$actualizado) > [1] 22/09/2014 09:41 am 22/09/2014 09:34 am 22/09/2014 09:43 am 19/09/2014 > 01:31 pm 19/09/2014 12:38 pm 23/09/2014 08:53 am > 492 Levels: 01/03/2014 07:49 pm 01/04/2014...
2014 Sep 25
4
Campo Fecha y paquete openair
...e que usar con %I y no con %H. Espero te sirva. Daniel Merino El 25 de septiembre de 2014, 11:18, Carlos Ortega <cof en qualityexcellence.es> escribió: > Hola Eduardo, > > He trabajado con el paquete Openair y para las fechas lo que hice fue > convertirlas con la función "ymd_hms()" del paquete "lubridate". > > La clase resultante debiera ser la misma que consigues con as.Date() y con > strptime(), lo miraré, pero en el mientras tanto prueba esta alternativa y > nos comentas si el problema desaparece. > > Saludos, > Carlos Ortega > www...
2023 Nov 06
1
strptime with +03:00 zone designator
try using 'lubridate' > library(lubridate)Attaching package: ?lubridate? The following objects are masked from ?package:base?: date, intersect, setdiff, union > x <- "2017-02-28T13:35:00+03:00"> ymd_hms(x)[1] "2017-02-28 10:35:00 UTC" > Thanks Jim Holtman *Data Munger Guru* *What is the problem that you are trying to solve?Tell me what you want to do, not how you want to do it.* On Sun, Nov 5, 2023 at 3:45?PM Richard O'Keefe <raoknz at gmail.com> wrote: > I have...
2023 Nov 06
1
strptime with +03:00 zone designator
...ltman at gmail.com> wrote: > try using 'lubridate' > > > library(lubridate)Attaching package: ?lubridate? > > The following objects are masked from ?package:base?: > > date, intersect, setdiff, union > > x <- "2017-02-28T13:35:00+03:00"> ymd_hms(x)[1] "2017-02-28 10:35:00 UTC" > > > > > > > Thanks > > Jim Holtman > *Data Munger Guru* > > > *What is the problem that you are trying to solve?Tell me what you want to > do, not how you want to do it.* > > > On Sun, Nov 5, 2023 at 3:45...
2023 Nov 06
1
strptime with +03:00 zone designator
...gt;> try using 'lubridate' >> >> > library(lubridate)Attaching package: ?lubridate? >> >> The following objects are masked from ?package:base?: >> >> date, intersect, setdiff, union >> > x <- "2017-02-28T13:35:00+03:00"> ymd_hms(x)[1] "2017-02-28 10:35:00 UTC" >> >> > >> >> >> >> Thanks >> >> Jim Holtman >> *Data Munger Guru* >> >> >> *What is the problem that you are trying to solve?Tell me what you want >> to do, not how you want t...
2013 Mar 07
8
Convertir eh hora
Hola a tod@s, Me han mandado una base de datos y al abrirla me he encontrado con la fecha y la hora en el siguiente formato: FECHA HORA 20121007 1206 20110622 1854 20110623 054 He conseguido que la Fecha me quedara en el formato dd/mm/aaaa mediante el script db[, "FECHA"] <- as.Date(as.character(db[,
2014 Sep 25
2
Campo Fecha y paquete openair
Estoy trabajando con el paquete openair y leyendo los datos desde un CSV. Entre los campos que estoy levantando existe uno con el formato dd/mm/YYYY hh:mm por ejemplo: 19/02/2014 12:42 pm Cuando quiero consultar por fechas con las funciones del paquete openair datoscont10<-selectByDate(dato$actualizado, start="01/03/2014", end="09/09/2014") me lista el siguiente mensaje:
2018 Feb 12
4
problema de fechas
Tengo un vector de fechas en formato R: > fechas <- c(?2016-07-15?, ?2016-10-12?, ?2017-02-11?) quiero que las fechas de 2017 (la tercera del vector del ejemplo) pasen a ser NA > fechas2 <- ifelse(fechas > ?2016-12-31?, NA, fechas) El problema que me encuentro es que el resultado (fechas2) es un vector numérico y no un vector de fechas. No encuentro la solución. Se agradecen
2023 Nov 06
2
strptime with +03:00 zone designator
...>>> > library(lubridate)Attaching package: ?lubridate? >>> >>> The following objects are masked from ?package:base?: >>> >>> date, intersect, setdiff, union > x <- >>> "2017-02-28T13:35:00+03:00"> ymd_hms(x)[1] "2017-02-28 >>> 10:35:00 UTC" >>> >>> > >>> >>> >>> >>> Thanks >>> >>> Jim Holtman *Data Munger Guru* >>> >>> >>> *Wh...
2013 Feb 08
4
convert 12 time stamp to 24 hour
Readers, For a 12 hour time stamp: > testtime<-("2013-01-01 01:00:01 PM") > testtime [1] "2013-01-01 01:00:01 PM" > testtime24hour<-strftime(testtime,'%H:%M:%S') > testtime24hour [1] "01:00:01" how to convert to 24 hour format so that the object 'testtime24hour' is: '13:00:01' Thanks. -- r2151
2023 Dec 07
1
Convert character date time to R date-time variable.
?s 16:21 de 07/12/2023, Sorkin, John escreveu: > Colleagues, > > I have a matrix of character data that represents date and time. The format of each element of the matrix is > "2020-09-17_00:00:00" > How can I convert the elements into a valid R date-time constant? > > Thank you, > John > > > > John David Sorkin M.D., Ph.D. > Professor of
2018 May 29
0
Convert daily data to weekly data
...18.8294372558594, 16 .... [TRUNCATED] > library(tidyverse) > library(lubridate) > # convert to long form > x_long <- gather(x, key = 'date', value = "value", -ID) > # change the date to POSIXct > x_long$date <- ymd_hms(substring(x_long$date, 2, 19)) > # add the week of the year > x_long$week <- week(x_long$date) > x_long$year <- year(x_long$date) > # average by ID/week > avg <- x_long %>% + group_by(ID, year, week) %>% + summarise(avg = mean(value)) > avg # A tibble: 6 x 4...
2018 May 29
3
Convert daily data to weekly data
Dear Petr, Thanks for your reply and the solution. The example dataset contains data for the first six days of the year 1986. "X1986.01.01.10.30.00" is 01 January 1986 and the rest of the variable is redundant information. The last date is given as "X2016.12.31.10.30.00". I realized that I missed one information in my previous email, I would like to compute the weekly average
2023 Nov 05
3
strptime with +03:00 zone designator
I have some data that includes timestamps like this: 2017-02-28T13:35:00+03:00 The documentation for strptime says that %z expects an offset like 0300. I don't see any way in the documentation to get it to accept +hh:mm with a colon separator, and everything I tried gave me NA as the answer. Section 4.2.5.1 of ISO 8601:2004(E) allows both the absence of colons in +hh[mm] (basic format) and
2017 Nov 20
2
mensaje de error al usar libreria tibbletime
Hola A todos. Aún no he podido encontrar la causa de porqué la libraría tibbletime, al transformar la tabla a AS_TBL_TIME ME ARROJA EL SIGUIENTE EL SIGUIENTE MENSAJE Error: assert_that: assertion must return a logical value Si alguien ha tenido ese mismo problema, solicito ayuda al foro. El seguimiento de la transformación es el siguiente; library(tibbletime)
2016 Aug 30
2
encontrar fechas saltadas
?El considerar las horas, minutos y segundos, depende de lo que quieras hacer. - Puedes incorporarlo en el campo fecha con la función de lubridate: "ymd_hms()". - Pero luego al crear el vector de referencia para encontrar los faltantes tienes que crear un vector secuencia entre la fecha mínima y la máxima. Este vector de referencia no tiene dudas de que es entre el max y el min con saltos de un día, pero si incluyes horas, minutos y se...