Re: [Rd] Unexpected behavior of '[' in an apply instruction

2021-02-12 Thread robin hankin
Rui > x <- array(runif(60), dim = c(10, 2, 3)) > array(x[slice.index(x,1) %in% 1:5],c(5,dim(x)[-1])) (I don't see this on stackoverflow; should I post this there too?) Most of the magic package is devoted to handling arrays of arbitrary dimensions and this functionality might be good to include

Re: [Rd] dput()

2020-02-29 Thread robin hankin
(x,as.numeric(out[length(out)])) ## TRUE > > > > ? > > > > > > > > > > On 2020-02-29 2:42 a.m., Rui Barradas wrote: > >> Hello, > >> > >> FAQ 7.31 > >> > >> See also this StackOverflow post: > >> > >>

[Rd] dput()

2020-02-28 Thread robin hankin
My interpretation of dput.Rd is that dput() gives an exact ASCII form of the internal representation of an R object. But: rhankin@cuttlefish:~ $ R --version R version 3.6.2 (2019-12-12) -- "Dark and Stormy Night" Copyright (C) 2019 The R Foundation for Statistical Computing Platform: x86_64-pc-l

Re: [Rd] specials issue, a heads up

2020-02-24 Thread robin hankin
Terry, speaking as a package author I would say that the package is the primary unit of organisation of R functionality, and package considerations should trump R style considerations. Packages should be self-contained as far as possible. Having said that, many of my own packages use---shall we s

Re: [Rd] Underscores in package names

2019-08-09 Thread robin hankin
Having written the 'lorentz' ,'Davies' and 'schwarzschild' packages, I'm interested in packages that are named for a particular person. There are (by my count) 34 packages on CRAN like this, with names that are the surname of a particular (real) person. Of these 34, only 7 are capitalized. hanki

Re: [Rd] nrow(rbind(character(), character())) returns 2 (as documented but very unintuitive, IMHO)

2019-05-16 Thread robin hankin
Gabriel, you ask an insightful and instructive question. One of R's great strengths is that we have a forum where this kind of edge-case can be fruitfully discussed. My interest in this would be the names of the arguments; in the magic package I make heavy use of the dimnames of zero-extent arrays.

[Rd] openblas

2019-05-07 Thread robin hankin
Hello, macosx 10.13.6, Rdevel r76458 I'm trying to compile against openblas to reproduce an error on the CRAN check page (my package is clean under winbuilder and all but one of the checks). I've downloaded and installed openblas 0.3.7 but I am not 100% sure that it is being used by R. Using

Re: [Rd] pcre problems

2019-03-01 Thread robin hankin
l.com On Fri, Mar 1, 2019 at 9:19 PM Tomas Kalibera wrote: > > On 3/1/19 9:03 AM, robin hankin wrote: > > OK thanks Tomas, but I get > > > > > > OK~ sudo apt-get build-dep r-base > > Reading package lists... Done > > E: Unable to find a source package fo

Re: [Rd] pcre problems

2019-03-01 Thread robin hankin
OK thanks Tomas, but I get OK~ sudo apt-get build-dep r-base Reading package lists... Done E: Unable to find a source package for r-base OK~ hankin.ro...@gmail.com On Fri, Mar 1, 2019 at 8:47 PM Tomas Kalibera wrote: > > On 3/1/19 7:10 AM, robin hankin wrote: > > thanks f

Re: [Rd] pcre problems

2019-02-28 Thread robin hankin
ine PACKAGE_VERSION "3.6.0" | #define PACKAGE_STRING "R 3.6.0" | #define PACKAGE_BUGREPOR hankin.ro...@gmail.com On Mon, Feb 25, 2019 at 9:39 PM Tomas Kalibera wrote: > > On 2/25/19 6:25 AM, robin hankin wrote: > > Hi there, ubuntu 18.04.2, trying to compi

[Rd] pcre problems

2019-02-24 Thread robin hankin
Hi there, ubuntu 18.04.2, trying to compile R-devel 3.6.0, svn 76155. I am having difficulty compiling R. I think I have pcre installed correctly: OK~/Downloads/R-devel pcretest -C PCRE version 8.41 2017-07-05 Compiled with 8-bit support UTF-8 support No Unicode properties support No ju

Re: [Rd] R (development) changes in arith, logic, relop with (0-extent) arrays

2016-09-08 Thread robin hankin
s compatible, but is it >>>> ever what the author actually intended? I have trouble thinking of a >>>> case >>>> where that less-than didn't carry an implicit assumption that y was >>>> non-NULL. I can say that in my own code, I&

Re: [Rd] R (development) changes in arith, logic, relop with (0-extent) arrays

2016-09-07 Thread robin hankin
of the above [for the very last part only!!], we would aim for > the following. These *all* give an error in current R-devel, > with the exception of 'm1 + NULL' which "only" gives a "bad > warning" : > > > > m1 <- matrix(

[Rd] gsl package on mavericks

2014-10-01 Thread robin hankin
.16, so it is difficult for me to investigate users' reports. Can anyone advise? -- Robin Hankin Neutral theorist hankin.ro...@gmail.com [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

[Rd] eigen(symmetric=TRUE) for complex matrices

2013-06-17 Thread robin hankin
n' [1] 3 1 > C <- matrix(c(2,1i,1i,2),2,2)# 'C' is symmetric > eigen(C,F,T)$values [1] 2-1i 2+1i > eigen(C,T,T)$values # answers disagree because 'C' is not Hermitian [1] 3 1 > -- Robin Hankin Uncertainty Analyst hankin.ro...@gmail.com [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

[Rd] file.system() in packages

2013-01-21 Thread robin hankin
nty.bib as R CMD INSTALL does not copy it to the system: > system.file("doc","uncertainty.bib",package="emulator") [1] "" > So I can't retrieve uncertainty.bib and this means that several other packages can't bibtex correctly. Can anyone advise

[Rd] columnames changes behaviour of formula

2012-05-24 Thread robin hankin
stent with the special meaning of '.' described under ?formula. Is this the intended behaviour? -- Robin Hankin Uncertainty Analyst hankin.ro...@gmail.com [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] seq_along and rep_along

2012-01-08 Thread robin hankin
and adiag() and apad() and aplus() etc etc that are not specific to magic hypercubes. Does the List have any comments? rksh > Hadley > > -- > Assistant Professor / Dobelman Family Junior Chair > Department of Statistics / Rice University > http:/

Re: [Rd] seq_along and rep_along

2012-01-08 Thread robin hankin
ent of Statistics / Rice University > http://had.co.nz/ > > __ > R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel -- Robin Hankin Uncertainty Analyst hankin.ro...@gmail.com ___

Re: [Rd] array extraction

2011-09-27 Thread robin hankin
4 7 10 11 14 17 20 21 24 27 30 This is not doing what I would want a[,M] to do. I'll checkout afill() right now best wishes Robin On Wed, Sep 28, 2011 at 10:39 AM, Simon Knapp wrote: > a[M] gives the same as your `cobbled together' code. > > On Wed, Sep 28, 2011

[Rd] array extraction

2011-09-27 Thread robin hankin
2:3] == dim(M1)) and all(dim(a)[5:7] == dim(M2)) for consistency. Can any R-devel subscribers advise? -- Robin Hankin Uncertainty Analyst hankin.ro...@gmail.com __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

[Rd] repeatable segfault

2011-09-05 Thread robin hankin
" > eigen(crossprod(matrix(1:2000, 50)) + (0+0i), T, T) *** caught segfault *** address 0x1038000a8, cause 'memory not mapped' Traceback: 1: .Call("La_rs_cmplx", x, only.values, PACKAGE = "base") 2: eigen(crossprod(matrix(1:2000, 50)) + (0 + (0+0i)), T, T) Possi

[Rd] NAMESPACE problems

2011-08-02 Thread robin hankin
citly or via an existing function Error : unable to load R code in package 'Brobdingnag' ERROR: lazy loading failed for package ‘Brobdingnag’ * removing ‘/Users/rksh/packages/Brobdingnag.Rcheck/Brobdingnag’ wt118:~/packages% AFAICS, all the setGeneric() calls are pretty much like this: setGe

Re: [Rd] Using GSL Routines

2011-04-13 Thread robin hankin
package? > > Thanks for the advice, > Mohit Dayal > Applied Statistics & Computing Lab > ISB > >        [[alternative HTML version deleted]] > > __ > R-devel@r-project.org mailing list > https://stat.e

[Rd] vignette typesetting issue

2011-03-01 Thread robin hankin
ley", which is poor form. The issue does not arise on my Mac, and I expect that it is down to some latex setting or style file. Does anyone recognize this problem? Can anyone advise? -- Robin Hankin Uncertainty Analyst hankin.ro...@gmail.com _

[Rd] Sexpr problem

2011-02-25 Thread robin hankin
could examine for Best Practice? thanks -- Robin Hankin Uncertainty Analyst hankin.ro...@gmail.com __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

[Rd] Dependencies problem

2011-02-17 Thread robin hankin
code2LazyLoadDB(package, lib.loc = lib.loc, keep.source = keep.source, : name space must not be loaded. ERROR: lazy loading failed for package ‘MM’ This error seems to be system-dependent. All of the depencies are packages which are on CRAN and AFAICS pass R CMD check. Can anyone advise? -- Robin

[Rd] S4 problems

2011-02-15 Thread robin hankin
uot;foo", for signature "Oarray" Three questions: Why does the first call to setMethod() give an error message? Why does (a) not find the method defined for arrays, even though 'a' is an array? How can I make "foo(a)" behave as desired when 'a' is

Re: [Rd] large vignette problem

2011-02-12 Thread robin hankin
> > <>= > null <- dev.off() > @ > > \begin{figure} >    \begin{center} >        \includegraphics{xyPlot.png} >    \end{center} > \end{figure} > > Original message ---- >>Date: Sun, 13 Feb 2011 10:54:37 +1300 >>From: r-devel-boun...@r-proj

[Rd] large vignette problem

2011-02-12 Thread robin hankin
into producing jpg files instead of PDF? Can anyone advise? thanks Robin -- Robin Hankin Uncertainty Analyst hankin.ro...@gmail.com __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

[Rd] NA printing

2011-01-25 Thread Robin Hankin
e such a command as options(NA_string = "-") available? best wishes Robin Hankin __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

[Rd] S4 package warning

2010-11-10 Thread Robin Hankin
Hello everyone. R-2.12.0, suse linux 11.3. I am debugging a package that uses S4 methods and R CMD check gives the following warning: > Warning in methods::findMethods(g, env) : > non-generic function 'mdm' given to findMethods() > See the information on DESCRIPTION files in the chapter 'Creat

Re: [Rd] S4 methods for rbind()

2010-10-26 Thread Robin Hankin
49, Martin Morgan wrote: > On 10/26/2010 03:53 AM, Robin Hankin wrote: > >> Hello. >> >> I am trying to write an S4 method for rbind(). I have a class of objects >> called 'mdm', and I want to be able to rbind() them to one another. >> >> I do not w

[Rd] S4 methods for rbind()

2010-10-26 Thread Robin Hankin
Hello. I am trying to write an S4 method for rbind(). I have a class of objects called 'mdm', and I want to be able to rbind() them to one another. I do not want the method for rbind() to coerce anything to an mdm object. I want rbind(x1,x2,x1,x2) to work as expected [ie rbind() should take any n

Re: [Rd] transpose of complex matrices in R

2010-07-30 Thread Robin Hankin
Hello Peter thanks for this. On 07/30/2010 11:01 AM, peter dalgaard wrote: What's wrong with t.complex<- function(x) t.default(Conj(x)) M<- matrix(rnorm(4)+1i*rnorm(4),2) M It's not going to help with the cross products though. As a general matter, in my book, transpose is tran

[Rd] transpose of complex matrices in R

2010-07-30 Thread Robin Hankin
Hello everybody When one is working with complex matrices, "transpose" very nearly always means *Hermitian* transpose, that is, A[i,j] <- Conj(A[j,i]). One often writes A^* for the Hermitian transpose. I have only once seen a "real-life" case where transposition does not occur simultaneously

Re: [Rd] RFC: lchoose() vs lfactorial() etc

2009-12-15 Thread Robin Hankin
Martin Becker wrote: Robin Hankin wrote: ... Is this the place to discuss having complex arguments for gamma()? ... If this discussion starts I would second the wish for the functionality of gsl's lngamma_complex in base R. Do you mean gsl or GSL? ;-) [the GNU scientific library is

Re: [Rd] RFC: lchoose() vs lfactorial() etc

2009-12-15 Thread Robin Hankin
Hi Martin I think you're absolutely right about this; One thing I need again and again is a multinomial function, and usually define: > lmultinomial function (x) { lfactorial(sum(x)) - sum(lfactorial(x)) } > multinomial function (x) { exp(lmultinomial(x)) } It would be nice to have this

[Rd] S4 and head() problems

2009-12-03 Thread Robin Hankin
Hi I am having difficulty defining an S4 method for head() and tail(). I can't quite provide minimal self-contained code because the problem appears to require the whole corpus of my package; and there also appears to be a difference between sourcing the lines directly, and having them installed

[Rd] S4 objects in the data directory

2009-11-12 Thread Robin Hankin
Hi [R-2.10.0; suse linux] I am having difficulty creating S4 objects in the data directory of a package. I want to create a bunch of simple S4 objects for use in the examples section of the Rd files. It says in R-exts that: " R code should be “self-sufficient” and not make use of extra fun

[Rd] bundle deprecation

2009-06-12 Thread Robin Hankin
Hi I read that bundles are to be deprecated in 2.10. The BACCO bundle contains three packages (emulator, calibrator, approximator) which I am happy to unbundle. But the 'BACCO' moniker has some considerable cachet for me in terms of recognizability (eg with grant-giving bodies), as it has becom

[Rd] parsing Rd files and \deqn{}

2009-05-01 Thread Robin Hankin
Hi [R-2.9.0] I am having difficulty including a LaTeX formula in an Rd file. The example given in section 2.7 in 'Parsing Rd files' is: \deqn{ f(x) = \left\{ \begin{array}{ll} 0 & x<0 \\ 1 & x\ge 0 \end{array} \right. }{non latex} For me, this gives: \deqn{ f(x)

Re: [Rd] vignettes in a bundle

2009-04-28 Thread Robin Hankin
etting about Sweave's 'result' code chunk option). But I still don't understand why your first suggestion worked. How does TeX 'know' that this is not to be included verbatim? best wishes and thanks again Robin Robin Hankin wrote: Hello Romain this is brilliant

Re: [Rd] vignettes in a bundle

2009-04-28 Thread Robin Hankin
utput? best wishes and thanks again Robin Romain Francois wrote: Hi Robin, Something like: <>= bib <- system.file( "bib", "mybib.bib", package = "yada" ) cat( "\\bibliography{",bib,"}\n") @ It would also be nice to be able to

[Rd] vignettes in a bundle

2009-04-28 Thread Robin Hankin
Hi I have a bundle comprising three packages. Each package has a vignette. Currently each vignette has a separate .bib file. How do I arrange the bundle so that each vignette accesses a single, common, .bib file? thanks Robin -- Robin K. S. Hankin Uncertainty Analyst University of Cambridg

Re: [Rd] vignette compilation times

2009-02-19 Thread Robin Hankin
thanks for this clarification Uwe Could I include the r_env_cache/ directory in the package and then assume that the CRAN checks use Sweave( , driver=weaver()) in which case the process takes about 10 seconds? rksh Uwe Ligges wrote: Robin Hankin wrote: Dear All I am preparing a

[Rd] vignette compilation times

2009-02-19 Thread Robin Hankin
Dear All I am preparing a number of vignettes that require a very long time to process with Sweave. The longest one takes 10 hours. I love the weaver package! Is a package that includes such a computationally intensive vignette acceptable on CRAN? Are there any guidelines here? -- Robin

Re: [Rd] \description in Rd files

2009-01-05 Thread Robin Hankin
Prof Brian Ripley wrote: I think you meant \describe On Mon, 5 Jan 2009, Robin Hankin wrote: Hi The aylmer package generates a warning (under R-2.9.0) for an Rd file which I think is OK. The package is clean under R-2.8.1. Did you actually look at the help under 2.8.1: it is I am

[Rd] \description in Rd files

2009-01-05 Thread Robin Hankin
Hi I make a point of going through my packages every so often and perusing the check results on CRAN. The aylmer package generates a warning (under R-2.9.0) for an Rd file which I think is OK. The package is clean under R-2.8.1. Specifically, the warning is: * checking Rd files ... OK

[Rd] array indexing

2008-12-05 Thread Robin Hankin
Hi. I have been pondering array indexing via matrices. > a <- array(1:27,rep(3,3)) > index <- matrix(c(1,1,1,1,2,3),2,3,byrow=TRUE) > a[index] [1] 1 22 as expected and documented. But what was the thinking behind the decision to access the array by rows rather than columns? The 'index' mat

Re: [Rd] \S4method in combination with "[" and "[<-"

2008-05-21 Thread Robin Hankin
oked in several packages but could not found any. Thanks for your help! Matthias -- Dr. Matthias Kohl www.stamats.de ______ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel -- Robin Hankin Uncertainty Analyst and

[Rd] optional setValidity()

2008-05-07 Thread Robin Hankin
ly that the conditions are automatically met. But OTOH, I want the check to be performed "by default" to stop anyone (me) from being too clever and defining a non-standard foo object that doesn't meet .checkfoo(). What is best practice here? Are there any examples I could copy?

Re: [Rd] prod(0, 1:1000) ; 0 * Inf etc

2008-04-22 Thread Robin Hankin
t;> STAT-IMA-FSB-EPFL, Station 8 >> CH-1015 Lausanne Switzerland >> http://stat.epfl.ch/ >> Tel: + 41 (0)21 693 7907 >> >> __ >> R-devel@r-project.org mailing list >> https://stat.ethz.ch/mailman/listinfo/r

[Rd] "[<-" plus drop-type extra argument

2008-04-02 Thread Robin Hankin
ot;: [1] 1 2 3 1 5 6 7 8 910 Slot "NC": [1] 10051 # Desired behaviour: NC recalculated > > a[4] <- 1 Error in .local(x, i, j, ..., value) : argument "value" is missing, with no default > # Undesired behaviour

Re: [Rd] tests Rin and Rout

2008-03-31 Thread Robin Hankin
isher's Exact Test for Count Data data: matrix(c(0, 20, 219, 1159), 2, 2) p-value = 0.05867 alternative hypothesis: true odds ratio is not equal to 1 95 percent confidence interval: 0.00 1.082225 sample estimates: odds ratio 0 > *just* shy of the magic 5% . . .

[Rd] S4 slot with NA default

2008-03-26 Thread Robin Hankin
esentation=representation(x="numeric"),prototype=list(x=NaN)) [1] "foo" > But this is not the correct sense: to me "NaN" means "not a number" and I want the sense to be "not available". Any advice? -- Robin Hankin Uncertainty

Re: [Rd] Re Bessel functions of complex argument

2008-03-10 Thread Robin Hankin
On 10 Mar 2008, at 11:03, Prof Brian Ripley wrote: > On Mon, 10 Mar 2008, Martin Maechler wrote: > >> {Diverted from an R-help thread} >> >>>>>>> "Robin" == Robin Hankin <[EMAIL PROTECTED]> >>>>>>>on Mon, 10 Mar 200

[Rd] a != a*1 != a+0 != +a

2008-02-04 Thread Robin Hankin
r of unary operators "+" and "-". If trim is TRUE, then "a" is one thing, but "+a" returns "trim(a)", which might be different. Also "1*a" would be different from "a" and "a+0" Does the List consider this to be

Re: [Rd] as.function()

2008-01-14 Thread Robin Hankin
On 14 Jan 2008, at 11:50, Duncan Murdoch wrote: > Robin Hankin wrote: >> Hi >> [snip] >> a <- crossprod(matrix(rnorm(12),ncol=3)) >> class(a) <- "foo" >> >> f <- as.function(a) # need help to write as.function.foo() >> x &l

Re: [Rd] as.function()

2008-01-14 Thread Robin Hankin
e(text = jj )[[1]] f } If f <- as.function.foo(x), somehow the "f" object has to include within itself the entirety of "x". In my case, "x" is [of course] an arbitrary- dimensional array of possibly complex elements. So I can't use Bill/Kurt's

Re: [Rd] as.function()

2008-01-14 Thread Robin Hankin
Function", which outlives short-lived polynomial "p". Unfortunately, I don't see a way to modify as.function.polynomial() to do what I want. best wishes rksh On 14 Jan 2008, at 08:45, Antonio, Fabio Di Narzo wrote: > 2008/1/14, Robin Hankin <[EMAIL PROTECT

[Rd] as.function()

2008-01-14 Thread Robin Hankin
(ax) a <- 4 f(x) # should still give tr(ax) even though "a" has been reassigned. [my real example is very much more complicated than this but I need this toy one too and I can't see how to modify as.function.polynomial() to do what I want] -- Robin Hankin

[Rd] S3 vs S4 for a simple package

2008-01-07 Thread Robin Hankin
. My impression is that S3 is perfectly adequate for this task, although I've not yet finalized the coding. S4 seems to be "overkill" for such a simple system. Can anyone give me some motivation for persisting with S4? Or indeed reassure me that S3 is a good design decision?

[Rd] branch cuts of log() and sqrt()

2007-12-18 Thread Robin Hankin
above. + } \section{S4 methods}{ Both are S4 generic and members of the 245-10:~/scratch/R-devel/src/library/base/man% -- Robin Hankin Uncertainty Analyst and Neutral Theorist, National Oceanography Centre, Southampton European Way, Southampton SO14 3ZH, UK tel 023-8059

Re: [Rd] Friday question: negative zero

2007-12-07 Thread Robin Hankin
ns but (IIRC) the patch I supplied only tested for the imaginary part being >0; would it be possible to include information about signed zero in these or other functions? > Duncan Murdoch > > __ > R-devel@r-project.org mailing

[Rd] vignettes and papers

2007-11-02 Thread Robin Hankin
package? -- 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] R-2.6.0 package check problems

2007-10-09 Thread Robin Hankin
On 5 Oct 2007, at 15:47, Robin Hankin wrote: > Hello > > > One of my packages, untb_1.3-2, passes R CMD check under > MacOSX (and apparently the systems used in the package check > summary page on CRAN) but fails with the following message on > R-2.6.0.tgz compiled last nig

[Rd] R-2.6.0 package check problems

2007-10-05 Thread Robin Hankin
03 svn rev43063 language R version.string R version 2.6.0 (2007-10-03) > > -- 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] (PR#9811) sequence(c(2, 0, 3)) produces surprising results,

2007-07-27 Thread Robin Hankin
on(x){unlist(sapply(x,function(i){seq_len (i)}))} is much faster. Neither sequence0() nor mySequence() accepts vectors with any element <0 although as Brian Ripley points out, sequence() itself does (which I think is undesirable). Robin Ha

Re: [Rd] sweep sanity checking?

2007-07-12 Thread Robin Hankin
x27; >>>> sweep? >>>> >>> >>> (now posted at >>> http://wiki.r-project.org/rwiki/doku.php?id=rdoc:base:sweep >>> ) >>> >>> It always warns if dim(x)[MARGIN] is >>> > > ___

[Rd] signature() and setMethod() problems

2007-06-28 Thread Robin Hankin
n.arith" <- function(o1,o2){stop("OO not implemented")} ".onion.real.arith" <- function(o,r){stop("OR not implemented")} ".real.onion.arith" <- function(r,o){stop("RO not implemented")} setMethod("Arith", signature (o1="onion&

[Rd] inherits() and virtual classes

2007-06-27 Thread Robin Hankin
setClass("onion", representation = "VIRTUAL" ) setClass("octonion", representation = representation(x="matrix"), prototype = list(x=matrix(numeric(),0,8)), contains = "onion" ) jj

Re: [Rd] two bessel function bugs for nu<0

2007-06-19 Thread Robin Hankin
t; Business School > Dublin City University > Dublin 9, Ireland > Tel +353 (0)1 700 7496 > > __ > R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/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] system() in packages

2007-04-27 Thread Robin Hankin
this eventuality gracefully? The functions that do use pari/gp have "pure" R equivalents (but much slower and less accurate) so I want users to be able to install the package without pari/gp. -- Robin Hankin Uncertainty Analyst National Oceanography Centr

[Rd] no visible binding for global variable

2007-04-17 Thread Robin Hankin
Hello everyone I am trying to get one of my packages through R's QC. The package is clean for me under R-2.4.1, R-2.5.0, and R-devel, but Kurt gets > > * checking R code for possible problems ... WARNING > hypercube: no visible binding for global variable ‘f’ Function hypercube() [cut-&-p

[Rd] R CMD Rd2dvi

2007-03-19 Thread Robin Hankin
s:~/scratch% rm BACCO.dvi octopus:~/scratch% R CMD Rd2dvi ./BACCO Hmm ... looks like a package bundle [snip]. -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way, Southampton SO14 3ZH, UK tel 023-8059-7743 __ R-deve

[Rd] S3 best practice

2007-03-02 Thread Robin Hankin
arately. How best to do this in the context of an S3 method for plot()? What is Best Practice here? -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way, Southampton SO14 3ZH, UK tel 023-8059-7743 __ R-devel@

[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

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

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] 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]> >>>>>>>

[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

[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] 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] 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 = &

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

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

[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("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("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("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("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

[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() and log()

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

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] 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] 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] 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] [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] 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

  1   2   >