Displaying 20 results from an estimated 100 matches similar to: "Problems with definitions of S4-generics"
2011 Nov 25
2
[LLVMdev] LLVM 2.9 - JIT problem on Windows
> > > My bet is that your code is writing through a stray pointer. By
> > > removing the call to InitializeNativeTarget you are simply hiding
> > > your bug by running the code within a context that turns its effects
> harmless.
> > >
> > > OTOH, LLVM 2.9 may be the culprit. In any case, it is time for a
> > > assembler- level debug session
2011 Aug 03
1
NAMESPACE problems
Hi.
I am having difficulty following section 1.6.6 of the R-extensions manual.
I am trying to update the Brobdingnag package to include a NAMESPACE file (the
untb package requires the Brobdingnag package).
Without the NAMESPACE file, the package passes R CMD check cleanly.
However, if I include a NAMESPACE file, even an empty one, R CMD check
gives the following error in 00install.out:
2009 Sep 28
1
model.matrix troubles with AlgDesign
Dear DevelopeRs,
in continuing with my suite of packages on experimental design, I am stuck
with an issue that appears to be related to package AlgDesign - I have tried
to get it solved by Bob Wheeler, but he seems to be stuck as well.
Whenever AlgDesign is loaded, some of my code does not work any more. For
example, in a fresh R session:
require(DoE.base)
fac.design(nlevels=c(2,6,2))
2005 Mar 10
1
how to view the syntax of a method which is not a generic method
Hello - I'm trying to modify an option for the lme() or nlme() macros.
I want to write my own specification for the variance function and am
following homework problem 4, Chapter 5, page 268 of Pinheiro and Bates
book on mixed effect.
I'm up to point where I've created a new class using an existing
variance function class, varExp as a template. Next I need to write an
2007 Mar 29
0
S4 generic surprise
I discovered the following behavior when source'ing the same file
repeatedly as I edited it. My generic stopped acting like a generic. I
can't tell from the docs what, if any, behavior is expected in this
case. R 2.4.0
> foo <- function(object) 3
> isGeneric("foo")
[1] FALSE
> setMethod("foo", "matrix", function(object) 4)
Creating a new
2009 Oct 23
2
mysteriously persistent generic definition
Originally I made a function yearStop that took an argument "object". I
made a generic, but later changed the argument to "x". R keeps
resurrecting the old definition. Could anyone explain what is going on,
or how to fix it? Note particularly the end of the transcript below: I
remove the generic, verify that the symbol is undefined, make a new
function, and then make a
2006 Sep 12
1
package.skeleton() in R-2.4.1
Hi
R version 2.4.0 alpha (2006-09-06 r39158)
MacOSX 10.4.7
There was a thread some time ago as to whether the structure created by
package.skeleton() would pass R CMD check.
I have an example where package.skeleton() gives an R file that gives an
error when sourced.
If I type
setClass("brob",
representation = representation
2017 Jan 09
1
problem with print.generic(x)deparse(substitute(x))
Hi, Peter et al.:
On 2017-01-09 4:24 AM, peter dalgaard wrote:
> On 09 Jan 2017, at 10:53 , Spencer Graves <spencer.graves at prodsyse.com> wrote:
>
>> # Define an object of class 'dum'
>> k <- 1
>> class(k) <- 'dum'
>> str(k) # as expected
>>
>> # Define print.dum
>> print.dum <- function(x, ...)
>>
2012 Feb 04
1
'deparse(substitute'))' then 'assign' in a S4 methods
Hi the list,
I am writing a function in which I need to affect a variable on a higher
level. My fnction could be:
++++++++++++++++++
fooBis <- function(x){
nameObject <- deparse(substitute(x))
print(nameObject)
assign(nameObject,4,envir=parent.frame())
}
> fooBis(e)
[1] "e"
> e
[1] 4
-----------------
(to simplify, this fnction can affect only the number
2024 Mar 15
2
Spurious warning in as.data.frame.factor()
>>>>> Ivan Krylov
>>>>> on Thu, 14 Mar 2024 14:17:38 +0300 writes:
> On Thu, 14 Mar 2024 10:41:54 +0100
> Martin Maechler <maechler at stat.math.ethz.ch> wrote:
>> Anybody trying S7 examples and see if they work w/o producing
>> wrong warnings?
> It looks like this is not applicable to S7. If I overwrite
>
2005 Nov 14
1
Tidiest way of modifying S4 classes?
I wish to make modifications to the plot.pedigree function in the
kinship package. My attempts to contact the maintainer have been
unsuccessful, but my question is general, so specifics of the kinship
package might not be an issue.
My first attempt was to make a new function Plot.pedigree in the
.GlobalEnv which mostly achieved what I wanted to. However, I'm sure
that's not the tidiest
2020 Mar 27
0
Possibility of Less Verbose Stack Trace
Good day,
Is there a setting the user can change to make R CMD check stack traces output less and make it easier to spot the line of code that's the problem? I use R Under development. Part of the trace I see looks like:
--- R stacktrace ---
where 1: .local(model, test, ...)
where 2: (new("nonstandardGenericFunction", .Data = function (model, test,
...)
{
2013 Jul 02
2
cache most-recent dispatch
Hi,
S4 method dispatch can be very slow. Would it be reasonable to cache the
most
recent dispatch, anticipating the next invocation will be on the same
type? This
would be very helpful in loops.
fun0 <- function(x)
sapply(x, paste, collapse="+")
fun1 <- function(x) {
paste <- selectMethod(paste, class(x[[1]]))
sapply(x, paste,
2006 Aug 28
2
S4 classes and objects -- fixed structure? No...
Hello.
Suppose you define a new S4-class, say
> setClass("track", representation(x="numeric", y="numeric"))
Don't worry if you have a deja vu, it's from the help page.
Your new class is said to have a fixed structure: two slots, x, and y,
and that should apply to all objects you construct as members of that class.
> tr <- new( "track" )
2024 Mar 15
1
Spurious warning in as.data.frame.factor()
>>>>> Martin Maechler
>>>>> on Fri, 15 Mar 2024 11:24:22 +0100 writes:
>>>>> Ivan Krylov
>>>>> on Thu, 14 Mar 2024 14:17:38 +0300 writes:
>> On Thu, 14 Mar 2024 10:41:54 +0100
>> Martin Maechler <maechler at stat.math.ethz.ch> wrote:
>>> Anybody trying S7 examples and see if they work
2008 Nov 25
2
dots methods: dispatch issues
There seems to be a bug arising when using multiple S4 generics with "..."
as the signature.
The following code works as expected:
##############################################################
> setGeneric("rbind", function(..., deparse.level=1)
standardGeneric("rbind"),
+ signature = "...")
Creating a generic for "rbind" in
2011 Nov 25
0
[LLVMdev] LLVM 2.9 - JIT problem on Windows
> > > Now, I may be wrong, but I was under the impression that a call to
> > > InitializeNativeTarget was recommended, if not compulsory, so. why
> > > commenting it out not only makes my LLVM code still work, but also
> > > prevent my application from generating the above error.?!
> >
> > My bet is that your code is writing through a stray pointer.
2011 Nov 25
2
[LLVMdev] LLVM 2.9 - JIT problem on Windows
> > Now, I may be wrong, but I was under the impression that a call to
> > InitializeNativeTarget was recommended, if not compulsory, so. why
> > commenting it out not only makes my LLVM code still work, but also
> > prevent my application from generating the above error.?!
>
> My bet is that your code is writing through a stray pointer. By removing the
> call to
2019 Jun 29
0
methods package: A _R_CHECK_LENGTH_1_LOGIC2_=true error
>>>>> Martin Maechler
>>>>> on Sat, 29 Jun 2019 12:05:49 +0200 writes:
>>>>> Martin Maechler
>>>>> on Sat, 29 Jun 2019 10:33:10 +0200 writes:
>>>>> peter dalgaard
>>>>> on Fri, 28 Jun 2019 16:20:03 +0200 writes:
>>> > On 28 Jun 2019, at 16:03 , Martin Maechler <maechler at
2019 Jun 29
2
methods package: A _R_CHECK_LENGTH_1_LOGIC2_=true error
>>>>> Martin Maechler
>>>>> on Sat, 29 Jun 2019 10:33:10 +0200 writes:
>>>>> peter dalgaard
>>>>> on Fri, 28 Jun 2019 16:20:03 +0200 writes:
>> > On 28 Jun 2019, at 16:03 , Martin Maechler <maechler at stat.math.ethz.ch> wrote:
>> >
>> >>>>>> Henrik Bengtsson