[Rd] largest acceptable lookup table in a package

2006-07-26 Thread Robin Hankin
consisting of logs of Stirling numbers calculated by Maple. As discussed on the List a few days ago (thanks again David!) Stirling numbers are computationally challenging; one needs exact integer arithmetic for very large integers for their calculation (a 100x100 table requires ~10^157) ] -- Robin

[Rd] data() statement in functions

2006-08-02 Thread Robin Hankin
is best practice in such situations? -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way, Southampton SO14 3ZH, UK tel 023-8059-7743 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinf

Re: [Rd] [R] big numbers

2006-08-22 Thread Robin Hankin
ger D. Peng wrote: > The 'gmp' package may be of use here, but I'm not sure. > > -roger > > Robin Hankin wrote: >> Hi >> >> Can I get R to handle really big numbers?I am not interested >> in more than (say) 10 sig figs, but I would like to deal w

[Rd] S4 methods for "+"

2006-08-25 Thread Robin Hankin
,101,12) maybe adding a track object to a scalar would shift the values of the x slot. The algorithm itself is no problem...but what is the S4 equivalent to the S3 technique of writing an Ops.track() function that tells R what "+" means? -- Robin Hankin Uncertainty Analy

Re: [Rd] S4 methods for "+"

2006-08-29 Thread Robin Hankin
rogramming with me. Most of my questions about S4 methods can be answered by reading chapters 4 and 5 over and over and over again, with occasional reference to the Green Book. ?SetMethod does not reference Venables & Ripley. Could this be added? > > On Fri, 25 Aug 2006, Ro

[Rd] vector S4 classes

2006-08-29 Thread Robin Hankin
when extracting the first three elements, it seems to be lost. What is the appropriate setClass() call to do what I want? Or indeed is making "thing" a vector class as sensible idea here? -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Wa

Re: [Rd] vector S4 classes

2006-08-29 Thread Robin Hankin
f a four-row matrix? What advantage does the setClass() method above have over the single-column-of-a-four-row-matrix method? best wishes Robin On 29 Aug 2006, at 11:11, Martin Maechler wrote: >>>>>> "Robin" == Robin Hankin <[EMAIL PROTECTED]> >>

[Rd] setMethod() and log()

2006-08-30 Thread Robin Hankin
cos=, cosh =, cumsum =, exp=, floor =, gamma =, lgamma =, sin=, sinh =, tan=,

[Rd] as.environment(NULL)

2006-09-01 Thread Robin Hankin
od("j", quaternion) S3method("k", quaternion) what do I have to do to make onion work under R-devel? -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way, Southampton SO14 3ZH, UK tel 023-8059-7743 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

[Rd] setMethod("Logic", ...)

2006-09-01 Thread Robin Hankin
ms to imply that there is no "Logic" group. So, what is the correct way to specify that logical operations are not allowed for "brob" objects? -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way, Southampton SO14 3ZH, UK tel 023-8059-7743 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] setMethod("Logic", ...)

2006-09-04 Thread Robin Hankin
;) } setMethod("Logic",signature(e1="brob"), .logicBrob) setMethod("Logic",signature(e2="brob"), .logicBrob) but this does not work as desired (setMethod() gives an error). I want, for example, !new("brob", x=1:10,positive=rep(T,10)) to call .log

[Rd] setMethod("Summary")

2006-09-04 Thread Robin Hankin
ignature)' formal arguments of the function. which seems to tell me (in conjunction with the advice from Extremes.Rd quote above) to use unnamed arguments to signature() ] What is the correct way to make sum(x) call .Brob.max() if x is a "brob" object? Or is is it bette

Re: [Rd] setMethod("Summary")

2006-09-05 Thread Robin Hankin
ALSE) > { > base::max(x, ..., na.rm = na.rm) > }, > group = "Summary") > > i don't have bleeding edge devel version installed, so i am not sure > whether recent changes to S4 have mooted the above. > > (also, i thought i s

[Rd] setMethod("c") [was: setMethod("Summary")]

2006-09-05 Thread Robin Hankin
> x <- new("brob",x=pi,positive=T) > c(x,x) but c(1,x) isn't dispatched to my function. How to deal cleanly with this case? Perhaps if any argument to c() is a brob object, I would like to coerce them all to brobs. Is this possible? -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way, Southampton SO14 3ZH, UK tel 023-8059-7743 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] setMethod("c") [was: setMethod("Summary")]

2006-09-06 Thread Robin Hankin
l way to ensure dispatch on _any_ applicable argument >> is to >> turn the computation into a pair-wise one and define the methods >> (NOT S3 >> methods) for the two arguments of the pairwise function. >> >> I won't try to reproduce the details off the top of my head

Re: [Rd] setMethod("c") [was: setMethod("Summary")]

2006-09-07 Thread Robin Hankin
t;ANY"), as > well as the method ("brob", "brob"), equivalent to the function > cPairOfBrobs(), and a default method that just uses c(). > > Something like: > - > cWithMethods <- function(x, ...) { >if(nargs()<3) > cPa

[Rd] package.skeleton() in R-2.4.1

2006-09-12 Thread Robin Hankin
NULL, "?") : syntax error at 2: structure(function(x){standardGeneric("getX")} 3: , generic = structure("getX", package = ".GlobalEnv"), package = ".GlobalEnv", group = list(), valueClass = character(0), signature = "x", default = &

[Rd] setMethod() woes

2006-09-15 Thread Robin Hankin
te("binary operator \"", .Generic, "\" not defined for Glub numbers")) } setMethod("Arith",signature(e1 = "brob", e2="brob"), .ArithBrob) setMethod("Arith",signature(e1 = "brob&quo

[Rd] printing of complex numbers in R-alpha

2006-09-21 Thread Robin Hankin
darwin8.7.0 system powerpc, darwin8.7.0 status alpha major 2 minor 4.0 year 2006 month 09 day15 svn rev39323 language R version.string R version 2.4.0 alpha (2006-09-15 r39323) -- Robin Hankin Uncertainty

[Rd] typesetting a matrix in an Rd file

2006-09-21 Thread Robin Hankin
he backslashes and ampersands are being escaped somehow, and TeX isn't interpreting them as desired. How do I write an Rd file so that the output of R CMD Rd2dvi includes a nicely typeset matrix? -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way, Southam

Re: [Rd] printing of complex numbers in R-alpha

2006-09-21 Thread Robin Hankin
0+ 3.1416e+01i [4] 1e+100+ 3.1416e+40i 1e+100+3.1416e+100i > rksh On 21 Sep 2006, at 14:11, Prof Brian Ripley wrote: > On Thu, 21 Sep 2006, Martin Maechler wrote: > >>>>>>> "Robin" == Robin Hankin <[EMAIL PROTECTED]> >>>>>>>

Re: [Rd] arraytake for extracting subarrays from multidimensional arrays

2006-10-19 Thread Robin Hankin
ument string to "[" > argstr <- paste(indvecstr,sep="",collapse=",") > argstr <- paste("x[",argstr,"]",sep="") > > #Finally, return the subsetted array > return(eval(parse(text=argstr))) > } > &

Re: [Rd] arraytake for extracting subarrays from multidimensional arrays

2006-10-19 Thread Robin Hankin
ll(indlist[[i]])) { >> indvecstr[i] <- ""; >> } else{ >> indvecstr[i] <- >> paste("c(",paste(indlist[[i]],sep="",collapse=","),")",sep="") >>} >> } >> >> #Then build up

[Rd] setReplaceMethod

2006-10-31 Thread Robin Hankin
jj.pos)) } else { x[i] <- as.brob(value) return(x) } } ) setReplaceMethod("[",signature("ANY","brob"), function(x,i,j,value){ x <- as.brob(x) x[i] <- as.brob(value) return(x) } ) -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way, Southampton SO14 3ZH, UK tel 023-8059-7743 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

<    1   2