posixct Questions
1
Solved
I have a data frame containing what should be a datetime column that has been read into R. The time values are appearing as numeric time as seen in the below data example. I would like to convert t...
3
Solved
I have dataset where time.start vary from 5:00:00 to 28:59:59 (i.e. 01.01.2013 28:00:00 is actually 02.01.2013 04:00:00). Dates are in %d.%m.%Y format.
Date Time.start
01.01.2013 22:13:07
01.01....
0
I want to create function which handles question:
05:00:00 - 28:59:59 time format
When I run script from that question it's working but when I run the function:
pal <- NormalDates(data,Date,Tim...
1
Solved
Melting the dataframe t.wide changes how the column "time" (class POSIXct) is printed.
t.wide <- data.frame(product=letters[1:5],
result=c(2, 4, 0, 0, 1),
t1=as.POSIXct("2014-05-26") + seq...
2
Solved
4
Solved
I am manipulating some POSIXlt DateTime objects. For example I would like to add an hour:
my.lt = as.POSIXlt("2010-01-09 22:00:00")
new.lt = my.lt + 3600
new.lt
# [1] "2010-01-09 23:00:00 EST"
cla...
1
How can I parse milliseconds correctly?
as.POSIXct function works as following in my environment.
> as.POSIXct("2014-02-24 11:30:00.001")
[1] "2014-02-24 11:30:00.000 JST"
> as.POSIXct("2014-02-...
1
Solved
I'm working with a date format of YYYY-mm-ddTHH:MM:SS.000Z (2014-02-05T08:45:01.326Z) or that has a separator T that separates the date from the time, and time indicator Z or "Zulu time" (UTC). I'm...
1
Consider a string in the format
test <- "YYYY-MM-DDT00:00:00.000-08:00"
My goal is to convert those strings to POSIXct format so that I can plot the data. my initial thought was to use
as.P...
2
Solved
I am not sure that I can ask this question here, let me know if I should do it somewhere else.
I have a data.table with 1e6 rows having this structure:
V1 V2 V3
1: 03/09/2011 08:05:40 1145.0
2: ...
Caeoma asked 9/12, 2013 at 23:45
2
Solved
I am trying to add single seconds to any repeated dates in my data frame.
i.e. from this:
value date
18 2013-07-09 16:49:23
62 2013-07-09 18:01:36
64 2013-07-09 18:46:51
29 2013-07-09 18:46:...
1
Solved
I used to use string comparisons directly in my code without giving it much of a thought. I then recently found that something is off here as though it worked for say
> "1" < "2"
[1] TRUE
...
1
Solved
I am working on "Localization Data for Person Activity Data Set" dataset from UCI and in this data set there is a column of date and time(both in one column) with following format:
27.05.20...
Suavity asked 28/9, 2013 at 1:5
2
Solved
I think I must not understand how POSIXct works, or something. As far as I understand, it is seconds since epoch, with epoch being a standard time like 1970-01-01 GMT.
I take two POSIXct times one...
3
I am using the following code to give me the day of the week from a date (in the form dd/mm/yyyy).
Edit: I have uploaded a more relvant dataset.
df <- structure(list(Date = c("18/01/2013", "18...
2
Solved
Trying to caulculate the difference in time between two two columns, however time 2 in 'difftime' is in the next.row
sample data:
structure(list(code = c(10888, 10888, 10888, 10888, 10888, 10888,...
1
Solved
I have data in the format
time <- c("16:53", "10:57", "11:58")
etc
I would like to create a new column where each of these times is rounded to the nearest hour. I cannot seem to get th...
1
Solved
I want to round a POSIXct down to the day, relative to a specific timezone.
If I try
round(as.POSIXct("2013-03-05 23:00:00 EST"), "day")
It returns
2013-03-06
Which makes sense, in that when...
4
Solved
Hello I am looking for an efficient way of selecting POSIXct rows from a data.table such that the time of day is less than say 12:00:00 (NOTE that millisecond is NOT required, so we can use ITime f...
Necropsy asked 5/4, 2013 at 9:28
1
Solved
Okay so here is a subtle "quirk" in the r as.Date function converting from a POSIXct with a timezone, which I am wondering if it is a bug.
> as.POSIXct("2013-03-29", tz = "Europe/London")
[1] ...
2
Solved
I know this has been asked several times and I looked at the questions and followed the suggestions. However, I couldn't solve this one.
The datetime.csv can be found on https://www.dropbox.com/s...
4
Solved
I have a Date, and am interested in representing it as an integer of yyyymm form. Currently, I do:
get_year_month <- function(d) { return(as.integer(format(d, "%Y%m")))}
mydate = seq.Date(from ...
3
Solved
I am interested in calculating averages over specific time periods in a time series data set.
Given a time series like this:
dtm=as.POSIXct("2007-03-27 05:00", tz="GMT")+3600*(1:240)
Count<-c...
Alive asked 8/3, 2013 at 1:1
3
Solved
I am using R to plot some data.
Date <- c("07/12/2012 05:00:00", "07/12/2012 06:00:00", "07/12/2012 07:00:00",
"07/12/2012 08:00:00","07/12/2012 10:...
2
I believe that R incorrectly formats POSIXct types with fractional seconds. I submitted this via R-bugs as an enhancement request and got brushed off with "we think the current behavior is correct ...
© 2022 - 2024 — McMap. All rights reserved.