posixct Questions

1

Solved

I have a date like "2016-01-01" (YYYY-MM-DD) and I'm using as.numeric(as.POSIXct(...)) to use it as an Integer. My question is, is there a way to add to this date a year, a month or a day ? ...
Catton asked 28/1, 2016 at 13:50

2

Solved

I have a data set that has dates and times for in and out. Each line is an in and out set, but some are blank. I can remove the blanks with na.omit and a nice read in (it was a csv, and na.strings=...
Rybinsk asked 19/11, 2015 at 19:48

6

Solved

My goal is to create a vector of POSIXct time stamps given a start, an end and a delta (15min, 1hour, 1day). I hoped I could use seq for this, but I have a problem converting between the numeric an...
Pusey asked 19/1, 2012 at 10:3

2

The problem I am trying to solve is that I have a data frame with a sorted POSIXct variable in it. Each row is categorized and I want to get the time differences between each row for each level and...
Jentoft asked 7/10, 2015 at 18:9

1

Solved

I would like to plot the results of a load test. Each row contains a timestamp in seconds and the response time for the request. For example: timestamp <- c(1441229131, 1441229132, 1441229133, ...
Threephase asked 2/9, 2015 at 22:13

3

Solved

I have a data file which has three columns thus: 20010101 000000 0.833 20010101 000500 0.814 20010101 001000 0.794 20010101 001500 0.772 ... As is fairly clear to human eyes, the first two are d...
Francium asked 30/4, 2013 at 13:32

2

Solved

Hi I have two tables (table1 and table2 below) and would like to join them based on the closest timestamp to form expected_output. Some kind of solution involving dplyr would be great if possible, ...
Lantana asked 4/8, 2015 at 20:13

2

Solved

I have a data frame that looks like this: Timedate TotalSolar_MW 20 2013-06-01 04:45:00 13.0 21 2013-06-01 05:00:00 41.7 22 2013-06-01 05:15:00 81.8 23 2013-06-01 05:30:00 153.0 24 2013-06-01 05:4...
Machuca asked 30/6, 2013 at 10:42

1

In the following example, can someone explain to me why the date 2015-03-31 changed to 1034-04-03? dt1 = data.table(id = c(1,2), date = as.POSIXct("2015-03-31 BST"), key = "id") dt1 # id date # 1:...
Mangonel asked 25/6, 2015 at 17:43

1

Solved

I want to subtract to POSIXct. I can do this but depending on the first row (i guess?) the difference will be in seconds or minutes. Below you can see the first diff is in seconds and the second di...
Hotien asked 28/5, 2015 at 14:53

1

I have a data.table object with the columns date and time stored as IDate/ITime objects. I also have a time zone column where the time zone is given as character. Now I want to create a column Da...
Psoriasis asked 28/5, 2015 at 12:23

2

Solved

I have a dataframe (df3) with with some values. One of these values is the daedlines. The data of this value is something like the following: deadline 1419397140 1418994978 1419984000 1418702400...
Cosmography asked 7/5, 2015 at 15:22

1

Solved

In Oracle DB: DESCRIBE ORACLE_DB_TABLE; |---------------------------------------| | Column Name | Data Type | |---------------------------------------| | TRANSACTION_TIME | DATE | | TRANSACTION_I...
Chantey asked 28/4, 2015 at 10:34

2

Solved

I can initialize a data.frame via df <- data.frame(a=numeric(), b=character()) But how do I define a column of type POSIXct? df <- data.frame(a=numeric(), b=character(), c=POSIXct()) wo...
Anamorphoscope asked 16/6, 2014 at 19:7

1

Solved

A quick google search seems to get me nowhere. What are valid time zones in lubridate's tz option? In particular, am looking for Brasilia's time zone. Thanks! library(lubridate) dts <- c("6-3-1...
Inch asked 21/4, 2015 at 22:29

2

How can I get the correct date from the first column in my code? test <- data.frame(posixdate = c("2013-05-01 00:59:00", "2013-05-01 01:59:00", "2013-05-01 02:59:00", "2013-05-01 03:59:00...
Affiliate asked 23/3, 2015 at 9:32

4

Solved

I have data provided in the form of a date telling the day (format "YYYY-MM-DD", e.g. "2015-03-11" and the hours of the day numbered (0-23). What is the most convenient way to produce time objects...
Subcontinent asked 13/3, 2015 at 10:35

4

Solved

Are there any existing implementations in R to parse ISO8601 strings into POSIXt objects? The ISO8601 spec allows date/times to be printed in a variety of (non-overlapping) formats, so one probably...
Southbound asked 25/8, 2012 at 21:43

3

Solved

R has is.vector, is.list, is.integer, is.double, is.numeric, is.factor, is.character, etc. Why is there no is.POSIXct, is.POSIXlt or is.Date? I need a reliable way to detect POSIXct object, and cl...
Sat asked 16/10, 2014 at 20:5

1

Solved

Why does the Date below change to "2014-07-07" when converted to POSIXct? Sys.setenv(TZ='America/Sao_Paulo') d <- as.Date("2014-07-08", format="%Y-%m-%d") d [1] "2014-07-08" as.POSIXct(d) [1] "...
Oviposit asked 9/10, 2014 at 13:29

1

Solved

My question comes from this question. The question had the following character string. x <- "2007-02-01 00:00:00" y <- "02/01/2007 00:06:10" If you try to convert this string to date-class...
Furey asked 21/9, 2014 at 22:24

1

I'm trying to convert a string to POSIXct in R v3.1.1 on Mac OS X Mavericks (10.9.4). This worked before upgrading Mavericks then R. My very simple code is now giving a warning and I don't understa...
Huarache asked 9/9, 2014 at 15:52

3

Solved

I'm trying to understand my difficulties in the past with inputting zoo objects. The following two uses of read.zoo give different results despite the default argument for tz supposedly being "" an...
Tiresias asked 28/8, 2014 at 20:6

3

Solved

I have a rather big dataframe with a column of POSIXct datetimes (~10yr of hourly data). I would flag all the rows in which the day falls in a Daylight saving period. For example if the Daylight sh...
Anta asked 12/8, 2014 at 14:6

2

Solved

I'm trying to pull data from a PostgreSQL database and the results for a timestamp field are inconsistent. I'm not sure if I'm handling POSIXct results properly. Otherwise, I think I found a bug in...
Courtesy asked 19/7, 2013 at 20:7

© 2022 - 2024 — McMap. All rights reserved.