similar to: subsetting time series

Displaying 20 results from an estimated 40000 matches similar to: "subsetting time series"

2010 Sep 03
1
Incorrect formatted output after subtracting non-integer seconds from POSIXt origin
> x<-as.POSIXct("1970-1-1", tz="UTC")-.5 > y<-as.POSIXct("1970-1-1", tz="UTC")+.5 > x==y [1] FALSE # of course but x and y "appear" to be the same when formatted, even with extra precision: > format(x, format="%Y-%m-%d %H:%M:%OS2") [1] "1970-01-01 00:00:00.50" > format(y, format="%Y-%m-%d
2013 Aug 22
1
From POSIXct to numeric and back with time zone
From POSIXct to numeric and back with time zone I am running regressions on data which has time series with different time resolution. Some data has hourly resolution, while most has either daily or weekly resolution. Aggregation is used to make the hourly data daily, while liner interpolation is used to find daily data from the weekly time series. This data manipulation requires some careful
2009 Mar 04
2
patch for axis.POSIXct (related to timezones)
I am finding that axis.POSIXct uses the local timezone for deciding where to put tic marks, even if the data being plotted are in another time zone. The solution is to use attr() to copy from the 'x' (provided as an argument) to the 'z' (used for the 'at' locations). I have pasted my proposed solution in section 1 below (as a diff). Then, in section 2, I'll put some
2012 Jun 15
2
time zones and the chron to POSIXct conversion
Hey R folks, i found some strange (to me) behaviour with chron to POSIXct conversion. The two lines of code result in two different results, on ewith the correct time zone, one without: library(chron) as.POSIXct(chron('12/12/2000'), tz = 'UTC') as.POSIXlt(chron('12/12/2000'), tz = 'UTC') Only the code below would give me a POSIXct object with the correct time
2004 Aug 17
3
Fwd: strptime() problem?
Hi all; I've already send a similar e-mail to the list and Prof. Brian Ripley answered me but my doubts remain unresolved. Thanks for the clarification, but perhaps I wasn't clear enough in posting my questions. I've got a postgres database which I read into R. The first column is Timestamp with timezone, and my data are already in UTC format. An 'printed' extract of R
2011 Apr 06
1
Problem to convert date to number
Hi R users, I have a maybe small problem which I cannot solve by myself. I want to convert "chron" "dates" "times" (04/30/06 11:35:00) to a number with as.POSIXct. The Problem is that I can't choose different timezones. I always get "CEST" and not "UTC" what I need. date = as.POSIXct(y,tz="UTC") "2006-04-30 11:35:00
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
2009 May 11
1
inconsistent results for axis.POSIXct
Some time ago, I posted a note about what I considered to be a bug in axis.POSIXt() for R 2.8.x, relating to whether timezones in the data are obeyed on the axes. A link to that note, and to a quick and helpful response, is at the following URL http://www.nabble.com/patch-for-axis.POSIXct-%28related-to-timezones%29-td22338700.html#a22338700 Note that R 2.9.0 has been adjusted to help with
2012 Jul 02
1
Undocumented behavior around daylight savings time?
Apologies for the intrusion. I am a lurker on list. I have been working to convert a digitized signal from a matlab file into R for analysis and other applications. R.matlab is working fine, and it is easy to convert the matlab date-time number (days since year 0) into R date-time numbers (seconds since 1970-01-01). Unfortunately, when I cast the R date-time number into POSIXct format it seems
2019 Jan 15
2
Cannot access other computers on LAN
Hello Julien, Am Mon, 14 Jan 2019 22:15:47 +0100 schrieb Julien dupont <marcelvierzon at gmail.com>: > ** Test 1 ** > On VPN_office I use 'tcpdump -npi any icmp and host 192.168.1.3' > When pinging 192.168.1.1 from client 1, with no success, I see no packet > passing. Sorry - the tcpdump command should end with "192.168.1.1" instead of
2012 Oct 01
3
merge.zoo returns unmatched dates
Sorry for the lack of reproducible data, but this seems to be a problem inherent to my dataset and I can't figure out where the issue is. I have several data frames set up as a time series with identical POSIXct date formats. If I keep the original data in data frame format and merge them using base merge- everything is perfect and everyone is happy. If I transform the data frames to zoo
2012 Feb 20
1
counting characters starting point
I have three character strings represented below as seq1, seq2, and seq3. Each string has a reference character different from the other. Thus, for seq1, the reference character is U, seq2, S (3rd S from left where A is leftmost character) and for seq3 Y. seq1 = PQRTUWXYseq2 = AQSDSSDHRSseq3 = EEZYJKFFBHO I wish to generate a 3 by 26 matrix where 3 represent seq1, seq2, seq3 and 26 the letters of
2009 Nov 12
1
xts conversion problem
I have two data frames, with two columns each, the first being a Date variable. I would like to convert them to xts objects, indexed by the Date column. I would like to use as.Date and not as.POSIXct as the dateformat. The puzzling fact is that it works for the first one but not the other. Here is a screenshot of the error: > str(DF1) 'data.frame': 367 obs. of 2 variables: $
2007 Jan 08
1
Does strptime(...,tz="GMT") do anything?
Hi All In trying to correlate some tide gauge data I need to deal with varying timezones. From the documentation on strptime, it seemed that the tz variable might have some effect on the conversion, but I'm not seeing an effect. > strptime("20061201 1:02 PST",format="%Y%m%d %H:%M",tz="PST")+0 [1] "2006-12-01 01:02:00 EST" >
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
2013 Apr 17
1
POSIXt oddness at end of 1969
A user here noticed the following difference between Linux and Windows versions of R-2.15.3 (and R-3.0.0, I think) when using times within a second of the end of 1969: f <- function (sec = -1) { x1 <- as.POSIXct(c(2 * sec, sec, 0), origin = "1970-01-01", tz = "UTC") x2 <- as.POSIXlt(x1) x3 <- as.POSIXct(x2, origin = "1970-01-01", tz =
2006 Mar 07
1
How to change time zones?
Say you have a POSIX object that is in UTC. How do you change the values to another timezone? If I do this: times <- strptime(times, "%H:%M:%S") times1 <- as.POSIXct(times, tz="UTC") times2 <- as.POSIXct(times, tz="CDT6CST") times1 id UTC, but times2 is still UTC, not CTD. Why? Is the only was to change time zones to add seconds to POSIX objects?
2017 May 18
2
[R] R-3.4.0 fails test
This has to do with your own timezone. If I run that code on my computer, both formats are correct. If I do this after Sys.setenv(TZ = "UTC") Then: > cbind(format(dlt), format(dct)) [,1] [,2] [1,] "2016-12-06 21:45:41" "2016-12-06 20:45:41" [2,] "2016-12-06 21:45:42" "2016-12-06 20:45:42" The reason for that, is that
2012 Feb 16
3
Converting ts into xts and subsetting
Greetings, I would like to subset observations in a time series using xts, after converting from ts to xts. X=ts(1:100, frequency=12, start=c(1976)) X2=as.xts(X) X2["1984"] The output: Feb 1984 98 Mar 1984 99 Apr 1984 100 What happened to January? The index is always one month off, with X2["1976-01"] giving me Feb 1976. Should I set the time using something else
2020 Apr 24
4
Timezone conversion on Ubuntu 20.04
Hi all, I am testing R 4.0 and ran into an issue with timezones on Ubuntu Focal: converting a timestamp to another timezone results in NA: as.POSIXct(as.POSIXlt(Sys.time(), tz = "CET"), tz = "EST") This only happens on Ubuntu Focal, it seems to work fine on Ubuntu Bionic. I am the standard ubuntu docker image icw/ r-base from Dirk's ppa:edd/r-4.0 on both systems. Am I