I think is clearer:
environment(print.Date) <- .GlobalEnv
x <- as_date(Inf, origin='1970-01-01')
print(x)
# [1] "Invalid date: Inf"
Best regards,
Emil Bode
Data-analyst
+31 6 43 83 89 33
emil.b...@dans.knaw.nl
DANS: Netherlands Institute for Permanent Access to Digita
xx
}
With the following results:
> environment(print.Date) <- .GlobalEnv
> as.Date(Inf, origin='1970-01-01')
[1] "Date with numerical value Inf"
Warning message:
In format.Date(x) :
Some dates are not in the interval 01-01-01 and -12-31, showing numerical
value.
ut for other
cases I think we need to change the underlying code, or at the very least
update documentation.
Any thoughts?
Best regards,
Emil Bode
Data-analyst
+31 6 43 83 89 33
emil.b...@dans.knaw.nl<mailto:emil.b...@dans.knaw.nl>
DANS: Netherlands Institute for Permanent Access to
, quote = T, col.names = NA,
sep = ";", dec = ",", qmethod = "double")
The “four;five;six” string is stored unquoted, so read.table (or read.csv)
breaks down.
This also affects write.csv and write.csv2, but I’ve written a patch,
See here-under.
Anyone who could f
likely cause a lot of problems.
You can always change the column-names later.
Best regards,
Emil Bode
Data-analyst
+31 6 43 83 89 33
emil.b...@dans.knaw.nl
DANS: Netherlands Institute for Permanent Access to Digital Research Resources
Anna van Saksenlaan 51 | 2593 HW Den Haag | +31 70 34
int of view, R is mostly a functional
programming language, I think if you want side-effects a for-loop would look
better.
Best regards,
Emil Bode
Data-analyst
+31 6 43 83 89 33
emil.b...@dans.knaw.nl
DANS: Netherlands Institute for Permanent Acc
Hope you can catch it.
Best regards,
Emil Bode
is an institute of the Dutch Academy KNAW <http://knaw.nl/nl> and funding
organisation NWO <http://www.nwo.nl/>.
On 15/08/2018, 02:57, "R-devel on behalf of Ronald Barry"
wrote:
Greetings,
My R package has b
length one, I can use the
shorter versions and then the if throws a warning (or an error for a length-0
or NA result).
I get it that for someone just starting in R, the differences between | and ||
can be confusing, but I guess that's just the price to pay for having a
vectorized langua
Okay, I thought you always wanted to check the length, but if we can only check
what's evaluated I mostly agree.
I still think there's not much wrong with how length-0 logicals are treated, as
the return of NA in cases where the value matters is enough warning I think,
and I can imagine some co
I
personally can't imagine a situation where I'd use || or && outside an
if-statement, so I'd rather have the current behaviour, because I'm not sure if
I'm reliant on logical(0) || TRUE somewhere in my code (even though that would
be ugly code, it's not wrong per se)
But I could always rewrite it, so I believe it's more a question of how much
would have to be rewritten. Maybe implement it first in devel, to see how many
people would complain?
Emil Bode
__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Agreed that's it's rounding error, and all.equal would be the way to go.
I wouldn't call it a bug, it's simply part of working with floating point
numbers, any language has the same issue.
And while we're at it, I think the function can be a lot shorter:
.is_continous_evenly_spaced <- function(n)
Hi all,
Could we modify the "%%" (modulo)-operator to include some tolerance for
rounding-errors when supplied with doubles?
It's not much work (patch supplied on the bottom), and I don't think it would
break anything, only if you were really interested in analysing rounding
differences.
An
erick
On Tue, Sep 11, 2018 at 12:11:29PM -0400, Duncan Murdoch wrote:
> On 11/09/2018 11:23 AM, Emil Bode wrote:
> > Hi all,
> >
> >
> >
> > Could we modify the "%%" (modulo)-operator to include some tolerance
for roun
rt back to the old situation)
My setup:
R 3.5.1 (Feather Spray), run with –vanilla option
GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin17)
macOS High Sierra 10.13.6
Best regards,
Emil Bode
Data-analyst
+31 6 43 83 89 33
emil.b...@dans.knaw.nl<mailto:emil.b...@dans.knaw.nl>
DAN
here are you
putting the system2 call and exactly where are you sending the
interrupt signal with ^C?
Best,
luke
On Fri, 14 Sep 2018, Emil Bode wrote:
> Hi all,
>
> I found some strange behaviour, which I think is a bug. Could someone
make an accou
that this also holds for non-integer n.
The most important thing is why people would use sample with a non-integer x, I
don’t see many use cases.
So I agree with Luke that a warning would be best, regardless of what the docs
say.
Best regards,
Emil Bode
Although it seems to be pretty weird
On Thu, Sep 20, 2018 at 11:46 AM Leo Lahti wrote:
>
> Time stamps are correct and my system time is correct.
How is your timezone set?
When I look at your github I see as timestamp for DESCRIPTION today, 1:25 PM
GMT+2. (and as I'm writing this, it's 1:12 PM GMT+2)
GMT+2 is CEST, if
ref, '"!')
or
if(is.numeric(ref) && any(!is.na(suppressWarnings(as.numeric(lev)
warning('Provided numeric reference, note that this will promote the ',
ref, 'th value, not level with value "', ref, '"!')
Best regards,
Emil Bode
course "?"
And note that if there is a dispatch, it's possible to get the argument-list of
a specific method, e.g. args(`[.data.frame`) works as expected (as it is not a
primitive)
Best regards,
Emil Bode
On 07/10/2018, 16:34, "R-devel on behalf of Rui Barradas"
wrote:
.5.1; macOS 10.13.6
Best regards,
Emil Bode
On 09/10/2018, 17:27, "R-devel on behalf of Russell, George"
wrote:
Dear R developers,
I have found a minute bug in R-3.5.1 (Windows version), about how times not
an exact number of seconds are displayed.
> as.POSIXct
these are simple extra input
parameters, which can have any value, including missing, they needn't be
evaluated.
Best regards,
Emil Bode
Data-analyst
+31 6 43 83 89 33
emil.b...@dans.knaw.nl
DANS: Netherlands Institute for Permanent Access to Digital Research Resources
Anna van Saksenlaan
o have it as an infix operator without having to use quotes:
`%$%<-` <- function(obj, attr, value) {
`attr<-`(obj, as.character(substitute(attr)), value)
}
Now “myobj %$% myattr <- values “ will do as you desire
Best regards,
Emil Bode
From: Abs Spurdle
Date: Tuesday, 16 October 2
op=1) first subsets, then drops the
row-dimension, so gives what you're looking for.
Hope this solves your problem.
Best regards,
Emil Bode
On 21/11/2018, 17:58, "R-devel on behalf of Dmitriy Selivanov"
wrote:
Hi Rui. Thanks for answer, I'm aware of drop = FALSE
involved, parent.frame(4) is the same environment as used by expr
Although this is cumbersome, and it gets even more cumbersome if you want to
access the error-object in #abunchofcode, or use #abunchofcode to return to a
higher level, so I get it you're looking for a more elegant solution.
B
Well, the situation with `[.data.frame` (and [<-) is complicated by the fact
that the data.frame-method is not a primitive, but the generic IS.
I'm not sure about dispatch for primitive-generics, but I bet it's done on the
first argument (as with S3). Which means `[`(j=1:2,d,i=1) has nothing to
I don’t have multiple installations to work from, so could somebody else
confirm this (if it’s not my expectations that are wrong) for R-devel/other
R-versions/other platforms?
My setup: R 3.5.1, MacOS 10.13.6, both Rstudio 1.1.453 and R --vanilla from Bash
Best regards,
Emil Bode
__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
"rows" and/or "cols", the variable "drop" is inserted in
the place of the first unnamed variable, so the result is the same as if calling
df[FALSE,,]:
[1] a b
<0 rows> (or 0-length row.names)
What I did expect was the same result as df[,,FALSE], i.e. the full dat
It looks like you're right that somewhere in (presumably) match.call, the
named, empty arguments are removed, such that the call plot(x=1:10, y=, 10:1)
is translated to plot(x=1:10, 10:1).
But I would have expected it to be the same as plot(x=1:10, , 10:1) (note the
", ,"), which gives an error
d, empty arguments behave
entirely different from omitting them (", ,")
And I definitely agree we need a guru to explain it all to us (
Cheers, Emil Bode
On 30/11/2018, 15:35, "S Ellison" wrote:
> Yes, I think all of that is correct. But y _is_ missing in
to be too disruptive, maybe we can write Patrick Burns (the
R-inferno) ; - )
Best regards,
Emil Bode
On 03/12/2018, 10:57, "Martin Maechler" wrote:
>>>>> Michael Lawrence
>>>>> on Fri, 30 Nov 2018 08:24:31 -0800 writes:
>
30 matches
Mail list logo