Displaying 20 results from an estimated 10000 matches similar to: "Shouldn't the \usage section tell the truth?"
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) {
2015 Jan 21
2
reducing redundant work in methods package
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
if(mustFind && identical(ans, FALSE))
stop(gettextf("methods may not be defined for primitive function %s
in this version of R",
2013 Aug 14
1
local variable assignment: first copies from higher frame?
hi all -- this might not be the correct list for this
question/discussion, though R-help didn't seem like the correct venue,
either, so...
i'm looking for just some extra clarification of how local variables
are defined/bound, beyond the simple cases given in the Language
document.
the particular instance is when there is variable assignment inside a function.
normally, this creates a
2007 May 01
1
Possible problem with S4 dispatch
Hi,
First a bit of disclaimer... I haven't isolated this problem into an
easy to reproduce case, and I won't be surprised if the root cause is
a fault in my code's use of name spaces or some such.
The error I'm seeing is one in which the desired method is not found.
What worries me in terms of my expectations of how to debug the
problem is that showMethods and selectMethod both
2020 Jun 23
1
mget(missingArgument)?
Currently, when mget() is used to get the value of a function's argument
with no default value and no value in the call it returns the empty name
(R_MissingArg). Is that the right thing to do or should it return
'ifnotfound' or give an error?
E.g.,
> a <- (function(x) { y <- "y from function's environment";
mget(c("x","y","z"),
2015 Jan 09
2
RFC: getifexists() {was [Bug 16065] "exists" ...}
>>>>> Martin Maechler <maechler at stat.math.ethz.ch>
>>>>> on Fri, 9 Jan 2015 14:00:38 +0100 writes:
>>>>> Michael Lawrence <lawrence.michael at gene.com>
>>>>> on Thu, 8 Jan 2015 14:02:26 -0800 writes:
>> On Thu, Jan 8, 2015 at 11:57 AM, <luke-tierney at uiowa.edu> wrote:
>>> On Thu, 8
2005 May 12
2
mget empty strings
Dear R community,
I am a beginner to R and have a question concerning mget, about I could
not find anything in the various documentation.
I have a column in a dataframe x for which I want to get values in y:
mget(x[,1], env=y, ifnotfound=NA)
I receive an error mesage:
Error in mget(x[, 1], env = y, ifnotfound = NA) :
attempt to use zero-length variable name
this is probably due to
2015 Jan 21
2
reducing redundant work in methods package
Hi all,
The function call series genericForPrimitive -> .findBasicFuns -> .findAll
happens 4400 times while the GenomicRanges package is loading. Each time
.findAll follows a chain of environments to determine that the methods
namespace is the only one that holds a variable called .BasicFunsList. This
accounts for ~10% of package loading time. I'm sure there is some history
to that
2012 Oct 20
1
R-2.15.1 CMD CHECK output: "Call Sequence"
Hi guRus,
i'm running R-2.15.1 and the R CMD CHECK output appears to have changed substantially, in that instead of pointing me to the offending functions or files, I get lots of 'call sequence' traces as below.
I've been using R CMD CHECK for years & never seen anything like this before. This is on a pretty fresh OSX 10.8 Mountain Lion installation, where I installed R from
2015 Jan 08
2
RFC: getifexists() {was [Bug 16065] "exists" ...}
On Thu, Jan 8, 2015 at 11:57 AM, <luke-tierney at uiowa.edu> 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 value that indicates
>> an unbound value
2015 May 09
1
PATCH: library(..., quietly=TRUE) still outputs "Loading required package: ..." (forgot to pass down 'quietly')
Calling library(..., quietly=TRUE) may still output:
Loading required package: <other pkg>
in some cases, e.g.
> library("R.utils", quietly=TRUE)
Loading required package: R.methodsS3
[...]
I traced this to base:::.getRequiredPackages2(), which forgets to pass
'quietly' to an internal library() call:
if (!attached) {
if (!quietly)
2014 May 22
1
Excluding objects from save.image
When dealing with object holding pointers that are only valid during a
single session, it would be convenient to exclude them from being saved
with the session image. (I am assuming that `quit` calls `save.image`
before quitting or is it internal?) Currently they are saved with the
pointer converted to NULL. Its a bit surprising for users not realizing the
object is no longer valid.
My thought is
2015 Jan 08
0
RFC: getifexists() {was [Bug 16065] "exists" ...}
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_UnboundValue).
A null default is fine -- it's a default; if it isn't right for
2024 Jan 18
2
Should subsetting named vector return named vector including named unmatched elements?
Subsetting vector (including lists) returns the same number of elements
as the subsetting vector, including unmatched elements which are
reported as `NA` or `NULL` (in case of lists).
Consider:
```
menu = list(
? "bacon" = "foo",
? "eggs" = "bar",
? "beans" = "baz"
? )
select = c("bacon", "eggs",
2024 Feb 18
1
Capturing Function Arguments
? Sat, 17 Feb 2024 11:15:43 -0700
"Reed A. Cartwright" <racartwright at gmail.com> ?????:
> I'm wrapping a function in R and I want to record all the arguments
> passed to it, including default values and missing values.
This is hard if not impossible to implement for the general case
because the default arguments are evaluated in the environment of the
function as it
2005 May 04
1
error with the function GOHyperG from GOstats package
I am running R 2.0.0, GOstats 1.1.1 and GO 1.7.0,
and when I use the function GOHyperG, I have the following error:
w1<-as.list(hgu95av2LOCUSID)
w2<-unique(unlist(w1))
set.seed(123)
myLL<-sample(w2,100)
xx <- GOHyperG(myLL)
Error in mget(x, env = GOTERM, ifnotfound = NA) :
recursive default argument reference
In fact first I tried this function with my locusId ' list (with
2012 Nov 02
1
Bioconductor, merging annotation with list of probeids
Hi all,
Im very new to R so please forgive my poor language! I've been trying to map
on my list of probeids the relative annotation but unsuccessfully. I get
this error
symbols <- mget(probes,mouse4302SYMBOL,ifnotfound=NA)
Error in .checkKeysAreWellFormed(keys) :
keys must be supplied in a character vector with no NAs
Thanks for your help!
Brawni
--
View this message in context:
2015 Jan 09
0
RFC: getifexists() {was [Bug 16065] "exists" ...}
>>>>> Michael Lawrence <lawrence.michael at gene.com>
>>>>> on Thu, 8 Jan 2015 14:02:26 -0800 writes:
> On Thu, Jan 8, 2015 at 11:57 AM, <luke-tierney at uiowa.edu> wrote:
>> On Thu, 8 Jan 2015, Michael Lawrence wrote:
>>
>> If we do add an argument to get(), then it should be named consistently
>>>
2016 Sep 05
1
mget call can trigger C stack usage error
Hi all, not sure if you will call this a bug or something else but the
following silly call trigger a low level error:
foo <- list(x=1)
class(foo) <- "new"
print.new <- function(x, ...) print(mget(names(formals())))
foo
> Error: C stack usage 7969412 is too close to the limit
--
Alexandre Courtiol
http://sites.google.com/site/alexandrecourtiol/home
*"Science is
2020 Jan 10
0
SUGGESTION: Settings to disable forked processing in R, e.g. parallel::mclapply()
On 1/10/20 7:33 AM, Henrik Bengtsson wrote:
> I'd like to pick up this thread started on 2019-04-11
> (https://hypatia.math.ethz.ch/pipermail/r-devel/2019-April/077632.html).
> Modulo all the other suggestions in this thread, would my proposal of
> being able to disable forked processing via an option or an
> environment variable make sense?
I don't think R should be doing