Displaying 20 results from an estimated 8000 matches similar to: "round.Date and trunc.Date not working / implemented"
2024 Feb 08
2
round.Date and trunc.Date not working / implemented
>>>>> Ji?? Moravec
>>>>> on Wed, 7 Feb 2024 10:23:15 +1300 writes:
> This is my first time working with dates, so if the answer is "Duh, work
> with POSIXt", please ignore it.
> Why is not `round.Date` and `trunc.Date` "implemented" for `Date`?
> Is this because `Date` is (mostly) a virtual class setup for a
2024 Feb 08
2
round.Date and trunc.Date not working / implemented
> On 8 Feb 2024, at 15:15, Martin Maechler <maechler at stat.math.ethz.ch> wrote:
>
>>>>>> Ji?? Moravec
>>>>>> on Wed, 7 Feb 2024 10:23:15 +1300 writes:
>
>> This is my first time working with dates, so if the answer is "Duh, work
>> with POSIXt", please ignore it.
>
>> Why is not `round.Date` and
2024 Feb 08
1
round.Date and trunc.Date not working / implemented
?s 14:36 de 08/02/2024, Olivier Benz via R-devel escreveu:
>> On 8 Feb 2024, at 15:15, Martin Maechler <maechler at stat.math.ethz.ch> wrote:
>>
>>>>>>> Ji?? Moravec
>>>>>>> on Wed, 7 Feb 2024 10:23:15 +1300 writes:
>>
>>> This is my first time working with dates, so if the answer is "Duh, work
>>> with
2024 Feb 08
1
round.Date and trunc.Date not working / implemented
Technically, there is a round() for 'Date' objects, but it doesn't
seem very useful, because it basically just fall back to the default
round() method, which only takes the 'digits' argument.
Here's an example:
> date <- Sys.Date()
> class(date)
[1] "Date"
We see that there are only two round() methods in addition to the
implicit built-in one;
>
2024 Feb 08
1
round.Date and trunc.Date not working / implemented
This is a workaround, and could be the basis for a round.Date improvement:
date <- Sys.Date()
as.Date(round(as.POSIXct(date), "years"))
as.Date(round(as.POSIXct(Sys.Date() + 180), "years"))
Duncan Murdoch
On 08/02/2024 12:23 p.m., Henrik Bengtsson wrote:
> Technically, there is a round() for 'Date' objects, but it doesn't
> seem very useful,
2024 Feb 09
1
round.Date and trunc.Date not working / implemented
> This is a workaround, and could be the basis for a round.Date
improvement:
>?? date <- Sys.Date()
>?? as.Date(round(as.POSIXct(date), "years"))
>?? as.Date(round(as.POSIXct(Sys.Date() + 180), "years"))
> Duncan Murdoch
That would work, perhaps structured similarly as `trunc.Date` is.
The only issue might be that `trunc.Date` is currently using
2012 Mar 25
2
Weird POSIXct behaviour
Friends
I have an xts that I wish to access.
Browse[2]> DATA.ba[[p]]["2012-03-20 00:59:57","bid"]
bid
2012-03-20 00:59:57 1.4993
So far so good.
Now putting the index into a variable:
Browse[2]> Time
[1] "2012-03-20 00:59:57 NZDT"
Browse[2]> DATA.ba[[p]][Time, "bid"]
bid
Where has it gone?
Looking closer....
2002 May 12
0
{round,trunc}.POSIXt and daylight savings time (PR#1543)
I have found what looks like a small problem in trunc.POSIXt()
involving the transition to/from standard time and daylight savings
time. Assuming my assessment is correct, I have a potential solution
to offer.
If a time in daylight savings time is rounded such that the rounded
value is on the other side of the transition, the isdst element does
not get changed accordingly. I have tested only
2024 Dec 08
1
Exposing native httpd server
I absolutely appreciate the desire for minimalism. On the other hand
Rserve has no dependencies other than R >= 1.5.0 (!!!), so you would in
any case be cutting your dependencies way down (`servr` has 16 recursive
dependencies of which 5 seem to be base/recommended, presumably this is
where your count of 12 came from; `Rserve` has none).
On 12/8/24 14:57, Ji?? Moravec wrote:
> Dear
2024 Dec 08
2
Exposing native httpd server
Dear Simon and Jeroen,
thank you for your answers. I have to reiterate that I am out of my
depth in here. My knowledge of http is clicking links and not much
beyond that.
I will definitely look into `webutils` and `Rserve`.
One of the reason why I brought this issue is that I have a static site
generator that uses the pkg `servr` to serve the static site locally,
before I push it to github
2012 Jun 15
2
POSIXlt and trunc
Hi,
I'm having trouble understanding how trunc is operating on vectors of
POSIXlt objects. Why does dates[1:4] in the last line return a bunch of NAs
even though dates look like it has all the right elements? This worries me
that something is off with my use of trunc. Is trunc not suppose to be
vectorized with POSIXlt? If not, then how should I truncate a bunch of
POSIXlt objects? I'm
2004 Feb 13
1
How to get time differences in consistent units?
I'm still having trouble getting to grips with time classes.
I wish to calculate the difference in days between events.
Browse[1]> insp.j$First
[1] "2002-02-19 13:00:00 NZDT"
Browse[1]> spray.j$Date
[1] "2001-11-29 13:00:00 NZDT"
Browse[1]> insp.jk - spray.j$Date
Time difference of 82 days
If I save insp.jk to a vector, I get a nice useful value of 82.
2012 Nov 12
1
System problem: Sys.time() returns GMT, says NZDT
When I say:
> Sys.time()
[1] "2012-11-12 21:30:14 NZDT"
>
But that is not what my clock on the wall and my system say. Cannot show
you my clock but...
worik@lemy:/tmp$ date
Tue Nov 13 10:32:20 NZDT 2012
Sys.time() is returning GMT
$version.string
[1] "R version 2.14.1 (2011-12-22)"
> Sys.timezone()
[1] "NZDT"
>
I'm a little lost!
Worik
2013 Jan 28
1
The RPC server is unavailable on Samba 4 clients
Hi,
I used to upgrade/migrated samba 3.3.10 to samba 3.4.17 with LDAP backend
in place, while upgrading the CentOS from 5.5 to 5.9. In place to retain
the trust relationship.
The users can able to login without re-authentication from existing
machines. Tested 3 XPs, and 3 Win7 but it takes 5-8 mins to login compared
to 1 win7 that was re-connected (disconnected from domain, restart, then
rejoin
2011 Mar 23
0
suggestions re trunc.POSIXt
Dear all,
I hope this is a right place to post this; r-help might be appropriate
but it looks like I'm suggesting a change in base package, so I
decided to post here. (+ Apologies if that has been changed recently
-- the version I'm using is R.2.12.2 on Windows.)
I've noticed an unexpected behavior of trunc.POSIXt:
foo <- seq(as.POSIXct( "2009-10-23 22:00:00"),
2012 Dec 06
1
Incorrect DST time changes in DateTimeClasses
Can anyone please shed any light on why R DateTimeClasses give weird times for when daylight saving time information changes, and which aren't consistent with the OS?
Example:
Expected result: in New Zealand DST stopped (NZDT -> NZST) at 03:00 NZDT on 2010-04-04, as confirmed by the OS time zone info (OS X 10.8.2):
zdump -v /etc/localtime
/etc/localtime Sat Apr 3 13:59:59 2010 UTC
2004 Oct 05
1
smbfs timestamp problem
Here's a curly one.
I have a share mounted via smbfs on my linux desktop. This share is on
a NetApp filer somewhere, but I've also tried this on a an old linux
server as well, and I have the same problem.
Basically, since day light savings came into effect here (NZDT or
+13), any file I create on the share gets a time creation timestamp
that is way out (approximately 12 hours and 48
2024 Dec 06
1
Exposing native httpd server
Ji??,
in a sense there are two quite different issue that you are touching upon. On one hand, your request for exposing the http server is something I was pretty much expecting. In order to judge the appetite for it I have included the support for custom handlers back then as inofficial API specifically so that if anyone cares we could work on refining it (really only Jeff and Hadley ever asked
2020 Oct 27
2
imapc_port not working
imap proxy is a "dumb proxy", it will just pass everything to google & back after you've authenticated.
imapc allows you to use imap sieve to some extent. I'm not sure what kind of Sieve manipulations you have in mind.
Aki
> On 27/10/2020 11:42 David Tildesley <davotnz at yahoo.co.nz> wrote:
>
>
> Hi Aki,
>
> Thanks. I didn't know that about
2002 Jul 04
1
possible bug
I don't know if that what I found is real bug, but I think that it's
important.
When you give a valid user at login, openssh waits something about 3
seconds after giving password (I'am not sure if its depends on system
configuration). But when you give user which does not exist, openssh
does not wait the same time. This allows to detect valid user on a
target system.
Jirka