Displaying 20 results from an estimated 7000 matches similar to: "Extracting a dataframe column as a dataframe"
2020 Oct 02
2
timezone tests and R-devel
Yes, the potential issue I see is that
make check
fails when I explicitly set TZ. However, I set it to be the same as what
the system reports when I login.
Details: The system (RHEL) I am working on has
$ strings /etc/localtime | tail -n 1
EST5EDT,M3.2.0,M11.1.0
$ date +%Z
EDT
$ echo $TZ
US/Eastern
On Fri, Oct 2, 2020 at 9:48 AM Sebastian Meyer <seb.meyer at fau.de> wrote:
> Thank
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
2020 Oct 01
3
timezone tests and R-devel
The return value of Sys.time() today with a timezone of US/Eastern is
unchanged between 4.0.3-patched and devel, but on devel the following test
fails
all.equal(x, as.POSIXlt(x))
with
x = Sys.time()
This means that devel does not complete make tests (failure on
tests/reg-tests-2.R)
It is entirely possible that it is an error on my end, I use
export TZ="US/Eastern"
but I have been
2011 Oct 19
1
Square ended segments
Good Afternoon R Community,
I am working on plotting behavior codes over short durations of time (a few seconds at a time over 1-2 hrs). I am utilizing as.POSIXct to store the time. I wanted to make a quasi time line using these time. I utilized the segments function to represent these times. However the segments rounds off at the ends and does not have the crisp look I need for my purposes.
2020 Oct 23
1
timezone tests and R-devel
Yes, you are absolutely right and I'm pretty sure this will be fixed in
one way or another.
IMO, the failing test should simply use all.equal.POSIXt's new argument
check.tzone=FALSE.
Two simple alternatives modifying all.equal.POSIXt behaviour:
- make check.tzone=FALSE the default: this is inconsistent with other
arguments of all.equal methods, always defaulting to stricter checks
-
2024 Oct 10
2
Time zones in POSIClt objects
POSIXt vectors do not support different time zones element-to-element.
If you want to keep track of timezones per element, you have to create a vector of timestamps (I would recommend POSIXct using UTC) and a parallel vector of timezone strings. How you manipulate these depends on your use cases, but from R's perspective you will have to manipulate them element-by-element.
I complained about
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
2011 Aug 14
2
Trouble: Time Difference with difftime
Hello all!!!
I want to measure the duration of events (given a start and an end time).
The catch is that I require the output in calender days. This means:
02-Jan-2011 00:01:00 minus 01-Jan-2011 23:59:00 should be 1 day (although
the real time difference is only 2 minutes)
My data is the following
head(episode.ct)
[1] "2009-07-13 13:37:20 CEST" "2009-07-14 07:29:20 CEST"
2024 Oct 10
1
Time zones in POSIClt objects
Sys.setenv(TZ = "GMT") will set the local time zone to GMT so there
would only be one time
zone regardless of whether local or GMT were used.
On Thu, Oct 10, 2024 at 11:17?AM Jan van der Laan <rhelp at eoos.dds.nl> wrote:
>
> Thanks.
>
> On 10/10/24 16:13, Jeff Newmiller wrote:
> > POSIXt vectors do not support different time zones element-to-element.
>
>
2012 Oct 30
2
changing date by +/- days
Hi,
Let say I have a date variable like this:
structure(1243792800, class = c("POSIXct", "POSIXt"), tzone = "GMT")
[1] "2009-05-31 18:00:00 GMT"
How can I make it 10 days prior, so:
[1] "2009-05-21 18:00:00 GMT"
I'm randomly selecting dates from a list and want a second value a set #
of days either before or after.
Thanks ahead of time.
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 Jul 18
2
loop searching the id corresponding to the given index (timestamp)
Hello,
I have the following loop for two data sets: diveData_2008 and
diveData_2009. It uses two other data: diveCond_all and fishTable. The
problem is at the point to identify the dive_id for the given index (index
is timestamp). It keeps on saying
for the1st loop
Error in fishReport$dive_id[i] <- dive_id : replacement has length zero
for the 2nd loop
Error in fishReport$dive_id[i + j] <-
2017 May 17
2
R-3.4.0 fails test
After installing R-3.4.0 I ran 'make check' which halted here:
$ > tail reg-tests-1d.Rout.fail -n 16
> ## format()ing invalid hand-constructed POSIXlt objects
> d <- as.POSIXlt("2016-12-06"); d$zone <- 1
> tools::assertError(format(d))
> d$zone <- NULL
> stopifnot(identical(format(d),"2016-12-06"))
> d$zone <- "CET" # =
2017 May 17
2
R-3.4.0 fails test
After installing R-3.4.0 I ran 'make check' which halted here:
$ > tail reg-tests-1d.Rout.fail -n 16
> ## format()ing invalid hand-constructed POSIXlt objects
> d <- as.POSIXlt("2016-12-06"); d$zone <- 1
> tools::assertError(format(d))
> d$zone <- NULL
> stopifnot(identical(format(d),"2016-12-06"))
> d$zone <- "CET" # =
2008 Sep 09
1
'xtfrm' performance (influences 'order' performance) in R devel
Hello everybody,
it looks like the presense of some (do know know which) S4 methods for a
given S4 class degrades the performance of xtfrm (used in 'order' in new
R-devel) by a factor of millions. This is for classes that ARE derived
from numeric directly and thus should be quite trivial to convert to
numeric.
Consider the following example:
setClass("TimeDateBase",
2024 Oct 10
2
Time zones in POSIClt objects
Thanks.
On 10/10/24 16:13, Jeff Newmiller wrote:
> POSIXt vectors do not support different time zones element-to-element.
> I complained about this on this list a couple of decades ago, and was
chastised for it. Evidently handling timezones per element was
considered to be too impractically slow to be a standard feature.
This is where it is unclear to me what the purpose is of the
2024 Oct 10
1
Time zones in POSIClt objects
It is not completely clear to me how time zones work with POSIXlt
objects. For POSIXct, I can understand what happens: time is always
stored in GMT, the `tzone` attribute only affects how the times are
displayed. All computations etc. are done in GMT.
POSIXlt objects have both a `tzone` attribute and a `zone` field. It
seems that the `zone` field is largely ignored. It only seems to be used
2010 Sep 06
3
Failure to aggregate
I have a (very big - 1.5 rows) dataframe with a (POSIXt" "POSIXlt") column h
(hour). Surprisingly, I cannot calculate a simple aggregate over the
dataframe.
> n.h1 = sqldf("select distinct h, count(*) from x group by h")
Error in sqliteExecStatement(con, statement, bind.data) :
RS-DBI driver: (error in statement: no such table: x)
In addition: Warning message:
In
2017 May 18
2
[R] R-3.4.0 fails test
> On 18 May 2017, at 13:47 , Joris Meys <jorismeys at gmail.com> wrote:
>
> Correction: Also dlt uses the default timezone, but POSIXlt is not recalculated whereas POSIXct is. Reason for that is the different way values are stored (hours, minutes, seconds as opposed to minutes from origin, as explained in my previous mail)
>
I would suspect that there is something more subtle
2012 Sep 09
1
Sum of column from another df based of row values of df1
Dear All,
I need to sum a column from another dataframe based on the row values
of one dataframe. I am stuck in a loop trying to accomplish it and at
current speed it will take more than 80 hours to complete. Needless to
say I am looking for a more elegant/quicker solution. Really need some
help here. Here is the issue:
I have a dataframe CALL (the dput of head is given below) which has
close to