search for: haverty

Displaying 20 results from an estimated 53 matches for "haverty".

2015 Jan 21
2
reducing redundant work in methods package
...(gettextf("methods may not be defined for primitive function %s in this version of R", sQuote(f)), domain = NA) ans } Seems to work just fine. Yes, "el" and "elNamed" can probably go now. Pete ____________________ Peter M. Haverty, Ph.D. Genentech, Inc. phaverty at gene.com On Wed, Jan 21, 2015 at 2:26 PM, Michael Lawrence <lawrence.michael at gene.com > wrote: > Note that setMethod() resolves .BasicFunsList in the methods namespace > directly when setting a method on a primitive. Somehow there should be > c...
2004 Jun 03
2
Winbind scalability issue
...what kind of scalability do you see with winbind? How many aggressive users can be supported? Using: Suse SLES 8 for ibm iSeries Samba authentication with winbind against win2k active directory. at the moment, a 100 FD network connection 3 windows DC's to authenticate against. Alex Laslavic Havertys Tech Services
2015 Jan 27
2
names function for environments?
...notice that as.list.environment has a sorted=FALSE argument already, so I guess identical(names(x), names(as.list(x))) could be made to be TRUE, assuming the order is at least persistent, if undefined, so that is a nice property. I guess I'm OK it with. On Tue, Jan 27, 2015 at 7:44 AM, Peter Haverty <haverty.peter at gene.com> wrote: > I think that the "sorted" and "all.names" arguments are really only > appropriate for pretty printing to the screen. I think it is a bit > unfortunate that environments have a names accessor that is 60X slower > than all th...
2015 Jan 27
2
names function for environments?
...the behavior is the same. Maybe a different name would be less "loaded" and imply lack of order, something like keySet(). But do we really need this? On Tue, Jan 27, 2015 at 7:11 AM, Martin Maechler < maechler at lynne.stat.math.ethz.ch> wrote: > >>>>> Peter Haverty <haverty.peter at gene.com> > >>>>> on Sun, 25 Jan 2015 12:21:04 -0800 writes: > > > Hi all, > > The "ls" function wears two hats. It allows users to inspect an > > environment interactively and also serves deeper in code as the...
2014 Dec 03
2
we need an exists/get hybrid
...ile, but it was something like if (defined(x{'c'})) { print x{'c'}; } # This is still two lookups, but it has the "defined" concept. or maybe even if (defined( foo = x{'c'} ) ) { print foo; } Thanks again for the timings! Pete ____________________ Peter M. Haverty, Ph.D. Genentech, Inc. phaverty at gene.com On Wed, Dec 3, 2014 at 12:48 PM, Winston Chang <winstonchang1 at gmail.com> wrote: > I've looked at related speed issues in the past, and have a couple > related points to add. (I've put the info below at > http://rpubs.com/wch/46...
2015 Jan 22
0
reducing redundant work in methods package
I also just noticed that there is a bug: identical(ans, FALSE) should be is.null(ans). So no error is thrown: > methods:::genericForPrimitive("foo") NULL Will fix. On Wed, Jan 21, 2015 at 3:13 PM, Peter Haverty <haverty.peter at gene.com> wrote: > Doing it like this: > > genericForPrimitive <- function(f, where = topenv(parent.frame()), mustFind > = TRUE) { > > ans = .BasicFunsList[[f]] > > ## this element may not exist (yet, during loading), dom't test null &g...
2015 Jan 22
3
speedbump in library
...ths <- paths[ file.exists(file.path(paths, "DESCRIPTION")) ] if(use_loaded && pkg %in% loadedNamespaces()) { dir <- if (pkg == "base") system.file() else getNamespaceInfo(pkg, "path") Pete ____________________ Peter M. Haverty, Ph.D. Genentech, Inc. phaverty at gene.com
2004 Jul 01
3
Samba w/Winbind HA cluster
...ticate against an Active Directory domain. The problem I see with this, is that the Winbind uid mappings will not necessarily be the same on both nodes in the HA cluster. Does anyone have any suggestions on how to get the winbind uid and gid mappings to match on 2 separate servers? Alex Laslavic Havertys Tech Services
2015 Jan 25
2
names function for environments?
...Rather than sprinkling sorted=FALSE throughout the methods and base code, let's use names. Would you be open to this change? I have submitted a patch and some timings to the bug tracker as https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=16170 Regards, Pete ____________________ Peter M. Haverty, Ph.D. Genentech, Inc. phaverty at gene.com
2015 Jan 29
0
names function for environments?
...s=TRUE))) is now for an environment 'x'. One could think to change the default of 'all.names' in as.list.environment(.) from FALSE to TRUE, but that may break code in subtle places and I don't think we should go there. Martin > On Tue, Jan 27, 2015 at 7:44 AM, Peter Haverty <haverty.peter at gene.com> > wrote: >> I think that the "sorted" and "all.names" arguments are really only >> appropriate for pretty printing to the screen. I think it is a bit >> unfortunate that environments have a names accessor th...
2015 Jan 21
2
reducing redundant work in methods package
...= as.call(c(as.name("{"), as.list(parse(text=newfun.body)))) assign(fname, newfun, envir=ns) } return(TEST_ENV) } # run code, print items in TEST_ENV The relevant code is in methods/R/BasicFunsList.R and methods/R/ClassExtensions.R Pete ____________________ Peter M. Haverty, Ph.D. Genentech, Inc. phaverty at gene.com [[alternative HTML version deleted]]
2014 Dec 04
0
we need an exists/get hybrid
All, So that suggests that .GlobalEnv[["X"]] is more efficient than get("X", pos=1L). What about .GlobalEnv[["X"]] <- value, compared to assign("X", value)? Dave On Wed, Dec 3, 2014 at 3:30 PM, Peter Haverty <haverty.peter at gene.com> wrote: > Thanks Winston! I'm amazed that "[[" beats calling the .Internal > directly. I guess the difference between .Primitive vs. .Internal is > pretty significant for things on this time scale. > > NULL meaning NULL and NULL meani...
2015 Jan 22
5
:: and ::: as .Primitives?
...king "::" and ":::" .Primitives? I have submitted some examples, timings, and a patch to the R bug tracker (https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=16134). I'd be very interested to hear your thoughts on the matter. Regards, Pete ____________________ Peter M. Haverty, Ph.D. Genentech, Inc. phaverty at gene.com
2015 Jan 29
1
names function for environments?
...I'm going to look through the uses of ls() inside of the core packages, because I suspect that is usually not necessary to extract the keys, and there is a cleaner (and probably faster) way to achieve the same result. > Martin > > > > On Tue, Jan 27, 2015 at 7:44 AM, Peter Haverty < > haverty.peter at gene.com> > > wrote: > > >> I think that the "sorted" and "all.names" arguments are really only > >> appropriate for pretty printing to the screen. I think it is a bit > >> unfortunate that environ...
2016 May 09
2
Regression in match() in R 3.3.0 when matching strings with different character encodings
Hi I think the following behavior is a regression from R 3.2.5: > match(iconv( c("\u00f8", "A"), from = "UTF8", to = "latin1" ), "\u00f8") [1] 1 NA > match(iconv( c("\u00f8"), from = "UTF8", to = "latin1" ), "\u00f8") [1] NA > match(iconv( c("\u00f8"), from = "UTF8",
2015 Jan 08
3
setequal: better readability, reduced memory footprint, and minor speedup
How about unique them both and compare the lengths? It's less work, especially allocation. Pete ____________________ Peter M. Haverty, Ph.D. Genentech, Inc. phaverty at gene.com On Thu, Jan 8, 2015 at 1:30 PM, peter dalgaard <pdalgd at gmail.com> 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 > so...
2015 Jan 22
5
:: and ::: as .Primitives?
...a need for a faster :: then going to a > SPECIALSXP is fine; it would also be good to make the byte code > compiler aware of it, and possibly to work on ways to improve the > performance further e.g. through cacheing. > > Best, > > luke > > > On Thu, 22 Jan 2015, Peter Haverty wrote: > > >> Hi all, >> >> When S4 methods are defined on base function (say, "match"), the >> function becomes a method with the body "base::match(x,y)". A call to >> such a function often spends more time doing "::" than in the fu...
2014 Dec 03
2
we need an exists/get hybrid
...erim. Similarly, the "assign" function does nothing with the "immediate" argument. I'd be interested to hear if there is any support for a "fetch"-like function (and/or deprecating some unused arguments). All the best, Pete Pete ____________________ Peter M. Haverty, Ph.D. Genentech, Inc. phaverty at gene.com [[alternative HTML version deleted]]
2015 Jan 27
0
names function for environments?
...mes" is natural. "ls" was certainly confusing for me when I started. Having to supply two additional arguments to get the desired output doesn't help there. Think of all the perl programmers struggling to switch to R. Let's help them out. Pete ____________________ Peter M. Haverty, Ph.D. Genentech, Inc. phaverty at gene.com On Tue, Jan 27, 2015 at 7:26 AM, Michael Lawrence <lawrence.michael at gene.com> wrote: > I think ls(, sort=FALSE) would be more explicit and thus clearer. There is > much precedent for having arguments that request less work to be done e.g....
2015 Jan 23
0
speedbump in library
...Namespace(pkg) will load the package if it's not already loaded, calling .getNamespace(pkg) (note the leading dot) won't load the package. I can't speak to whether there are any pitfalls in changing the library path searching, though. -Winston On Thu, Jan 22, 2015 at 12:25 PM, Peter Haverty <haverty.peter at gene.com> wrote: > Hi all, > > Profiling turned up a bit of a speedbump in the library function. I > submitted a patch to the R bug tracker as bug 16168 and I've also > included it below. The alternate code is simpler and easier to > read/maintain, I be...