In November, we had a "bug repository conversation"
with Peter Hagerty and myself:
https://bugs.r-project.org/bugzilla/show_bug.cgi?id=16065
where the bug report title started with
--->> "exists" is a bottleneck for dispatch and package loading, ...
Peter proposed an extra simplified and he
On 08/01/2015 4:16 AM, Martin Maechler wrote:
> In November, we had a "bug repository conversation"
> with Peter Hagerty and myself:
>
> https://bugs.r-project.org/bugzilla/show_bug.cgi?id=16065
>
> where the bug report title started with
>
> --->> "exists" is a bottleneck for dispatch and p
Why are you reporting that your PCRE library does not have something
which the R-admin manual says it should preferably have? To wit,
footnote 37 says
'and not PCRE2, which started at version 10.0. PCRE must be built with
UTF-8 support (not the default) and support for Unicode properties is
Have a look at the following, taken from base::rank:
...
if (!is.na(na.last) && any(nas)) {
yy <- integer(length(x)) # <~
storage.mode(yy) <- storage.mode(y) # <
yy <- NA
NAkeep <- (na.last == "keep")
if (NAkeep || na.last) {
Very timely, as this is how I got into the problem I posted about
earlier; maybe some of the problems I ran into will mean more to the
you and the experts on this thread, Dr. Murdoch.For reference, I run
Windows 7 64bit, and I am trying to build a 64 bit version of R-3.1.2.
As we discussed offline
On 2015-01-08 14:18, Avraham Adler wrote:
Very timely, as this is how I got into the problem I posted about
earlier; maybe some of the problems I ran into will mean more to the
you and the experts on this thread, Dr. Murdoch.For reference, I run
Windows 7 64bit, and I am trying to build a 64 bit
Adding an optional argument to get (and mget) like
val <- get(name, where, ..., value.if.not.found=NULL ) (*)
would be useful for many. HOWEVER, it is possible that there could be
some confusion here: (*) can give a NULL because either x exists and
has value NULL, or because x doesn't exist.
> Arunkumar Srinivasan
> on Thu, 8 Jan 2015 13:46:57 +0100 writes:
> Have a look at the following, taken from base::rank:
> ...
> if (!is.na(na.last) && any(nas)) {
> yy <- integer(length(x)) # <~
> storage.mode(yy) <- storage.mode(y) # <
>
> Indeed. Interesting that nobody has noticed till now,
> even though that part has been world readable since at least 2008-08-25.
That was what made me a bit unsure :-).
> Note that the R source code is at
> http://svn.r-project.org/R/
> and the file in question at
> http://svn.r-pro
On 08/01/2015 9:03 AM, John Nolan wrote:
Adding an optional argument to get (and mget) like
val <- get(name, where, ..., value.if.not.found=NULL ) (*)
That would be a bad idea, as it would change behaviour of existing uses
of get(). What I suggested would not
give a default. If the arg wa
Dan, for OS X, there is a new pcre library posted at
http://r.research.att.com/libs/ with a date stamp of Dec 28. This fixes
this problem. You can test for this by running
make check
post compilation. It'll bang out with a failure if this is not in order.
(And I know that all of this is descr
If we do add an argument to get(), then it should be named consistently
with the ifnotfound argument of mget(). As mentioned, the possibility of a
NULL value is problematic. One solution is a sentinel value that indicates
an unbound value (like R_UnboundValue).
But another idea (and one pretty sim
> Adding an optional argument to get (and mget) like
> val <- get(name, where, ..., value.if.not.found=NULL ) (*)
> would be useful for many. HOWEVER, it is possible that there could be
> some confusion here: (*) can give a NULL because either x exists and
> has value NULL, or because x does
In the documentation the closed thing I see to an explanation of this is
that ?detach says "Unloading some namespaces has undesirable side effects"
Can anyone explain why unloading tseries will load zoo? I don't think
this behavior is specific to tseries, it's just an example. I realize
one wo
The r.dll crash is easy - you need to be using gcc-ar for ar, and gcc-ranlib
for ranlib. I also posted a patch to fix the check failure for stack probing,
as lto optimizes away the stack probing code, as it should.
yes, lto build's speed gain is very impressive.
-
Paul,
My switchr package (https://github.com/gmbecker/switchr) has the
flushSession function which does what you want and seems to work (on my
test machine at least).
I havent tested it under a recent Rdevel, or with that specific package,
however I will soon, as the overarching model of switchr
On Thu, Jan 8, 2015 at 10:48 AM, Hin-Tak Leung
wrote:
>
> The r.dll crash is easy - you need to be using gcc-ar for ar, and gcc-ranlib
> for ranlib. I also posted a patch to fix the check failure for stack probing,
> as lto optimizes away the stack probing code, as it should.
>
> yes, lto build'
Oh, I forgot to mention that besides setting AR, RANLIB and the stack probing
fix, you also need a very up to date binutils. 2.25 was out in december. Even
with that , if you linker's default is not what you are compiling for (i.e. a
multiarch toolchain), you need to set GNUTARGET also, i.e. -m3
On Thu, 8 Jan 2015, Michael Lawrence wrote:
If we do add an argument to get(), then it should be named consistently
with the ifnotfound argument of mget(). As mentioned, the possibility of a
NULL value is problematic. One solution is a sentinel value that indicates
an unbound value (like R_Unbou
I have setup a Solaris server to test packages before submitting to
CRAN, in order to catch problems that might not reveal themselves on
Fedora, Debian, OSX or Windows. The machine runs a Solaris 11.2 vm
with Solaris Studio 12.3.
I was able to compile current r-devel using the suggested environmen
On Thu, Jan 8, 2015 at 6:36 AM, Duncan Murdoch wrote:
>> val <- get(name, where, ..., value.if.not.found=NULL ) (*)
>
> That would be a bad idea, as it would change behaviour of existing uses of
> get().
Another approach would be if the "not found" behavior consists of a
callback, e.g. an expre
If you look at the definition of %in%, you'll find that it is implemented using
match, so if we did as you suggest, I give it about three days before someone
suggests to inline the function call... Readability of source code is not
usually our prime concern.
The && idea does have some merit, th
For what it's worth, I think we would need a new function if the default
behavior changes. Since we already have "get" and "mget", maybe "cget" for
"conditional get"? "if get", "safe get", ...
I like the idea of keeping the original "not found" behavior if the
"if.not.found" arg is missing. Howe
Michael's idea has an interesting bonus that he and I discussed earlier.
It would be very convenient to have a container of key/value pairs. I
imagine many people often write this:
x - mapply( names(x), x, FUN=function(k,v) { # work with key and value }
especially ex perl people accustomed to
w
On Thu, Jan 8, 2015 at 11:57 AM, wrote:
> On Thu, 8 Jan 2015, Michael Lawrence wrote:
>
> If we do add an argument to get(), then it should be named consistently
>> with the ifnotfound argument of mget(). As mentioned, the possibility of a
>> NULL value is problematic. One solution is a sentinel
Dear all,
I am getting an R CMD check warning about the PDF manual. I am having a
hard time finding out what is wrong, here is the log of the Rd2pdf call.
The full check (and other) log is at
https://api.travis-ci.org/jobs/46373922/log.txt?deansi=true if anybody is
interested, and the package its
> why is there no setcontains()?
Several packages define is.subset(), which I am assuming is what you are
proposing, but it its arguments reversed. E.g., package:algstat has
is.subset <- function(x, y) all(x %in% y)
containsQ <- function(y, x) all(x %in% y)
and package:rje has essentially t
How about unique them both and compare the lengths? It's less work,
especially allocation.
Pete
Peter M. Haverty, Ph.D.
Genentech, Inc.
phave...@gene.com
On Thu, Jan 8, 2015 at 1:30 PM, peter dalgaard wrote:
> If you look at the definition of %in%, you'll find that it i
Currently unique() does duplicated() internally and then extracts. One
could make a countUnique that simply counts, rather than allocate the
logical return value of duplicated(). But so much of the cost is in the
hash operation that it probably won't help much, but that might depend on
the sizes of
Try this out. It looks like a 2X speedup for some cases and a wash in
others. "unique" does two allocations, but skipping the "> 0L" allocation
could make up for it.
library(microbenchmark)
library(RUnit)
x = sample.int(1e4, 1e5, TRUE)
y = sample.int(1e4, 1e5, TRUE)
set_equal <- function(x, y)
I was thinking something like:
setequal <- function(x,y) {
xu = unique(x)
yu = unique(y)
if (length(xu) != length(yu)) { return FALSE; }
return (all( match( xu, yu, 0L ) > 0L ) )
}
This lets you fail early for cheap (skipping the allocation from the
">0L"s). Whether or not this goes fast depends
On 01/08/2015 01:30 PM, peter dalgaard wrote:
If you look at the definition of %in%, you'll find that it is implemented using
match, so if we did as you suggest, I give it about three days before someone
suggests to inline the function call...
But you wouldn't bet money on that right? Because
Regarding the redefinition error, I've asked on StackOverflow for
advice [1], but I have noticed the following; perhaps someone here can
understand what changed between the stdio.h of 4.6.3 and the stdio.h
of 4.8.4. In GCC 4.8.4, the section of stdio.h which is referenced in
the errors is the follo
33 matches
Mail list logo