[Rd] C code in packages with complex arguments/returned value

2005-07-01 Thread Robin Hankin
(or how it should be done). -- 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] C code in packages with complex arguments/returned value

2005-07-01 Thread Robin Hankin
1865 272866 (PA) > Oxford OX1 3TG, UKFax: +44 1865 272595 > -- 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] prototypes for z_sin() and z_cos()

2005-07-04 Thread Robin Hankin
;t help me: find ~/downloads/R-2.1.1/ -name "*.h " | xargs egrep "z_cos" returned empty. How do I access z_sin() from my c code? -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way, Southampton SO1

Re: [Rd] Computer algebra in R - would that be an idea??

2005-07-13 Thread Robin Hankin
t; best approach. I didn't see documentation for their API (the >>> exports of >>> their DLL), but I didn't spend long looking. >>> >>> Duncan Murdoch >>> >>> __ >>> R-devel@r-project.or

Re: [Rd] Computer algebra in R - would that be an idea??

2005-07-15 Thread Robin Hankin
, and APL > used to be my first `beloved' computer language (in high school!) > -- but does J really provide computer algebra in the sense of > Maxima , Maple or yacas... ?? > > (and no, please refrain from flame wars about APL vs .. vs .., > it's hard to refrain for me, too...) >

Re: [Rd] Computer algebra in R - would that be an idea??

2005-07-18 Thread Robin Hankin
gt; Martin Maechler, ETH Zurich >> >> __ >> R-devel@r-project.org mailing list >> https://stat.ethz.ch/mailman/listinfo/r-devel >> > > > -- > Simon Blomberg, B.Sc.(Hons.), Ph.D, M.App.Stat. > Centre for Res

[Rd] octonions

2005-07-29 Thread Robin Hankin
e same way that (eg) complex matrices do. Perhaps we could define "*" and "/" appropriately for vectors of class "octonion" (if such a thing makes sense): or is there a better way? Also, Mod(), Re(), and perhaps Conj() would have to be generalized to work with

[Rd] generic function argument list problem

2005-08-31 Thread Robin Hankin
...) just like rep.default(), but R CMD check complains about it, pointing out that rep() and rep.octonion() have different arguments. What do I have to do to my rep.octonion() function to make my package pass R CMD check without warning? -- Robin Hankin Uncertainty Analyst National Ocea

[Rd] generic function S3 consistency warning advice

2005-09-01 Thread Robin Hankin
ons and methods' of the 'Writing R Extensions' manual. I can suppress the warning by commenting out the first line. Is this a sensible thing to do? -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way, Southampton SO14 3ZH, UK tel 02

[Rd] two almost identical packages: best practice

2005-09-09 Thread Robin Hankin
uot;An" as well. There is a small number of functions and datasets that are specific to octonions. What is Best Practice in this situation? I don't want to edit two separate packages in tandem. Is there a mechanism for doing what I want in the context of a bundle? -- Robin

Re: [Rd] x[1,], x[1,,], x[1,,,], ...

2005-11-29 Thread Robin Hankin
="") > expr <- parse(text=code) > y <- eval(expr) > > ndim <- length(dim(x)) > args <- rep(",", ndim) > args[1] <- "i" > args <- paste(args, collapse="") > code <- paste("x[", args, "]", sep="&q

Re: [Rd] x[1,], x[1,,], x[1,,,], ...

2005-11-29 Thread Robin Hankin
(), arev() enjoy! ] On 29 Nov 2005, at 15:17, Gabor Grothendieck wrote: > I couldn't find it: > >> library(magic) >> apltake > Error: object "apltake" not found > > On 11/29/05, Robin Hankin <[EMAIL PROTECTED]> wrote: >> Hi everyone >>

[Rd] eigen()

2006-01-10 Thread Robin Hankin
der development (unstable) (2006-01-04 r36984) > Note the strange magnitude of the output. [ I need this to work because one of my packages fails under R-devel ] -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way, Southampton SO14 3ZH, UK

Re: [Rd] eigen()

2006-01-10 Thread Robin Hankin
53, 55, 77, 79, 84, 83, 8, 6, 60, 58, 64, 62, 88, 86, 9, 10, 33, 35, 57, 59, 61, 63, 85, 87, 12, 11, 36, 34), .Dim = c(10, 10)) [no magic package! it fails R CMD check !] > round(Re(eigen(magic(10),F,T)$values)) [1] 7.544456e+165 0.00e+00 0.00e+00 0.00e+00 0.00e +00 [6] 0.000

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

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

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

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

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

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

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

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

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

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

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

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(

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

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

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

[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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

[Rd] R-latest.tar.gz make error

2006-04-13 Thread Robin Hankin
R] Error 1 make: *** [R] Error 1 238-250:~/scratch/R-beta% -- 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] unsigned long long integers

2006-04-24 Thread Robin Hankin
are my options? [the same happens with signed long long integers] -- 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] R CMD check problem

2006-05-22 Thread Robin Hankin
Resources/bin/exec/i386/R: Unknown error: 0 Robin-Hankins-Computer:~/scratch% anyone got any insight into this? -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way, Southampton SO14 3ZH, UK tel 023-8059-7743 ___

Re: [Rd] Idempotent apply

2006-06-09 Thread Robin Hankin
ll(expand.grid, structure(lapply(dim(x), seq, > from=1))) > subsets <- cbind(subsets, x=matrix(TRUE, ncol=length(vdim(x[[1]])), > nrow=nrow(subsets))) > > y <- array(NA, c(vdim(x), vdim(x[[1]]))) > for(i in 1:length(x)) { > y <- d

Re: [Rd] [R] combining tables

2006-06-20 Thread Robin Hankin
ned in my Ops.count() function. In my case, the only operation that I want to redefine is "+". I want to leave all the others unchanged. What is Best Practice for redefining just one binary operator? > > On 6/19/06, Robin Hankin <[EMAIL PROTECTED]> wrote: >> Hi >

[Rd] invalid alignment error in R-2.4.0

2006-07-11 Thread Robin Hankin
g R version 2.4.0 Under development (unstable) (2006-07-09 r38523) > -- 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] invalid alignment error in R-2.4.0

2006-07-11 Thread Robin Hankin
d3b724, rho=0x181d2e8) at eval.c:456 #48 0x010b7d30 in Rf_ReplIteration (rho=0x181d2e8, savestack=0, browselevel=0, state=0xbfffed88) at main.c:254 #49 0x010b7e88 in R_ReplConsole (rho=0x181d2e8, savestack=0, browselevel=0) at main.c:302 #50 0x010b8198 in run_Rmainloop () at main.c:913 #51

Re: [Rd] invalid alignment error in R-2.4.0

2006-07-11 Thread Robin Hankin
> found nothing, even with gctorture on (and valgrind instrumentation of > R's memory management on). > > You used the dput and Robin used load(), so presumably on not > exactly the > same object. I think Robin needs to test what he actually gave us, > to be > sur

[Rd] pari/gp interface

2006-07-25 Thread Robin Hankin
e portable method than the one above? [ PARI/GP is a widely used computer algebra system designed for fast computations in number theory. It is freely available at http://pari.math.u-bordeaux.fr/ ] -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Wa

  1   2   >