similar to: dispatching on group generics with more than one formal

Displaying 20 results from an estimated 400 matches similar to: "dispatching on group generics with more than one formal"

2006 Oct 06
1
class unions?
the code below has me confused: setClassUnion("index", c("numeric", "character", "logical")) extends("numeric") # i don't see the class union library(Matrix) extends("numeric") # now i see the class union i am aware that the "Matrix" package separately defines the "index" class union. is it the case that
2006 Sep 23
1
generics for primitive functions
i think these two code snippets exhibit a bug. they are identical but for the inclusion of an initial line in snippet [2] [1] setMethod("Math", signature(x = "numeric"), function(x) "Works") getGeneric("sqrt")(4) [2] getGeneric("sqrt")(4) setMethod("Math", signature(x = "numeric"), function(x) "Works")
2006 Sep 27
1
potential setClass bug (with user-defined environment)
the following returns an error in an 'exists' call on my machine MyEnv <- new.env() setClass("Numeric", "numeric", where=MyEnv) franklin parlamis > version _ platform powerpc-apple-darwin8.7.0 arch powerpc os darwin8.7.0 system powerpc, darwin8.7.0 status beta major 2 minor 4.0 year
2006 Oct 19
1
default arguments in generics and methods
i believe the following is true but would appreciate confirmation that it is intended behavior and will continue: if a default argument is employed in the definition of a generic function, and the generic is called with the argument in question (call it 'ARG') missing, then the method for signature (..., ARG = "missing", ...) will be called by 'standardGeneric'
2014 Nov 25
0
problem with setGroupGeneric from package methods
Hi, There seems to be a problem with setGroupGeneric() from package 'methods'. The symptoms are somewhat erratic, in the sense that small changes may lead to any of the following behaviours. 1.Package works without problems on Windows and installs on Linux but gives error when loaded with library(). 2.Package installs on both systems and gives error when loaded on any of them. 3.
2005 Dec 29
1
trouble with S4 methods for group "Summary"
Hello. This question concerns the Methods package. I have created a new class and am trying to set a method for it for S4 group generic "Summary". I have run into some signature problems. An example: > setClass("track", representation(x="numeric", y="character")) [1] "track" > setGeneric("max", group="Summary")
2006 Sep 20
1
residual '*tmp*' variable after "[<-" error
self-sanity check prior to filing a bug report: attempted replacement that generates an error leaves a '*tmp*' variable in the global environment. test <- 1:10 test[2:4] <- expression(e) ls() i've read section 3.4.4 of the "R Language Definition" which discusses the mechanism for replacement, and it is not clear to me whether this was intended, but i suspect
2006 Dec 18
2
write() gotcha
Hi I used write() the other day to save some results. It seems that write() does not record the full precision of the objects being written: > write(pi,file="~/f",ncolumns=1) > pi.saved <- scan("~/f") Read 1 item > dput(pi) 3.14159265358979 > dput(pi.saved) 3.141593 > pi-pi.saved [1] -3.464102e-07 > This difficulty was particularly difficult to
2007 Mar 19
1
Again...
Newbie trying to install wine in his Mac OSX, getting the old annoying message, home:~/Desktop/wine G3$ /Users/G3/Desktop/wine/tools/wineinstall WINE Installer v0.75 Running configure... configure: creating cache config.cache checking build system type... powerpc-apple-darwin8.7.0 checking host system type... powerpc-apple-darwin8.7.0 checking whether make sets $(MAKE)... no checking for gcc...
2006 Jul 11
1
invalid alignment error in R-2.4.0
Hi I thought I'd pass one of my package through R CMD check with R-2.4.0 with the following result (it's clean under R-2.3.1): [snip] > > # histogram of the fourth power: > hist(out^4, col="gray") *** caught bus error *** address 0x12, cause 'invalid alignment' Traceback: 1: sort(x, partial = c(half, half + 1)) 2: sum(sort(x, partial = c(half, half +
2006 Oct 07
1
Installing Lindsey's packages
Dear r-helpers, I downloaded http://popgen.unimaas.nl/~jlindsey/rcode/rmutil.tar (it was originally .tgz, but got unzipped by my browser). Can anyone give me detailed instructions on installing this and Lindsey's other packages on R version 2.4.0 (2006-10-03)---(powerpc- apple-darwin8.7.0, locale: C)? _____________________________ Professor Michael Kubovy University of Virginia
2007 Dec 11
3
Fresh rspec on rails install blows up
Hi there, I installed the rspec on rails plugin for a new project today and guess what -- it blows up! All by other rspec on rails projects are working fine. I updated all gems & still no joy. Any ideas how I can troubleshoot this one ? Here''s my setup: - ruby 1.8.4 (2005-12-24) [powerpc-darwin8.7.0] - Rails 1.2.5 Installed with svn: ruby script/plugin install
2007 Jun 27
2
Loading problem with XML_1.9
Hello all, I have loading problem with XML_1.9 under 64 bit R2.3.1, which I got from http://R.research.att.com/. XML_1.9 works fine under 32 bit R2.5.0. I thought that could be installation problem, and I tried install.packages or biocLite, every time the package installed fine, except some warning messages below: ld64 warning: in /usr/lib/libxml2.dylib, file does not contain requested
2006 Oct 06
1
glm and plot.effects
Dear R-helpers, I don't see a difference between the following two plots of effect objects, which I understand should be different. What am I missing? require(doBy) require(effects) data(budworm) m1 <- glm(ndead/20 ~ sex + log(dose), data=budworm, weight=ntotal, family=binomial) m1.eff <- all.effects(m1) plot(m1.eff, rescale.axis = FALSE, selection = 2, main = 'rescale =
2002 Apr 29
0
methods package: inheriting from structures; group generics
Now that 1.5 is released, some changes have been committed to the r-devel version of the methods package. They are mostly bug fixes (or making things work more as users would expect) in two areas: 1. new classes that extend one of the basic datatypes that have attributes but had no class attribute in S3 (e.g., "matrix" or "ts"). The previous code didn't handle the
2005 Nov 23
3
date/time arithmetic
On the help page "DateTimeClasses {base}" it says: "One can add or subtract a number of seconds or a difftime object from a date-time object, but not add two date-time objects." However, > x<-Sys.time(); y<-Sys.time()+3600 > diff<-y-x > x; y; diff [1] "2005-11-23 19:58:20 GMT" [1] "2005-11-23 20:58:20 GMT" Time difference of 1 hours
2006 Oct 08
2
latex and anova.lme problem
Dear R-helpers, When I try > anova(txtE2.lme, txtE2.lme1) Model df AIC BIC logLik Test L.Ratio p-value txtE2.lme 1 10 8590 8638 -4285 txtE2.lme1 2 7 8591 8624 -4288 1 vs 2 6.79 0.0789 > latex(anova(txtE2.lme, txtE2.lme1)) Error: object "n.group" not found I don't even see n.group as one of the arguments of latex() I checked to see >
2006 Sep 04
1
setMethod("Summary")
Hi everyone and thanks for being patient. I've used "!.foo"() et seq pro tem. Next problem: how to define "Summary" methods for brobs. ?max says 'max' and 'min' are generic functions: methods can be defined for them individually or via the 'Summary' group generic. For this to work properly, the arguments '...' should be
2005 Oct 12
1
bug checking
I have observed the following behavior, wondering if it is a bug before I submit a report. I am using the plot function with call: plot(X, Y, col="red", . . . ) where X is an object that inherits from classes 'dates' and 'times' (created with the 'dates' function from package 'chron') and y is a numeric vector. The color red is applied to the
2006 Sep 21
1
printing of complex numbers in R-alpha
Hello everyone I am finding complex numbers to be printed oddly in R-alpha. > 1e100+1e100i [1] 1e+100+1e+100i > 1e100 + 1e44i [1] 1e+100+100000000000000008821361405306422640701865984i > dput(1e100+1e44i) 1e+100+100000000000000008821361405306422640701865984i > [same thing at home on a linux box] The first line is what I would expect, the second and third lines aren't: I