On 8/25/2006 6:52 PM, Bill Dunlap wrote:
>>> >> There have been propositions to make "+" work in S (and
>>> >> R) like in some other languages, namely for character
>>> >> (vectors),
>>> >>
>>> >> a + b := paste(a,b, sep="")
>>> ...
>>> yes. I think however if we keep speed and
> > >> There have been propositions to make "+" work in S (and
> > >> R) like in some other languages, namely for character
> > >> (vectors),
> > >>
> > >> a + b := paste(a,b, sep="")
> > ...
> > yes. I think however if we keep speed and clarity and catching
> > user errors all
On 8/25/2006 4:55 PM, Martin Maechler wrote:
>> "Duncan" == Duncan Murdoch <[EMAIL PROTECTED]>
>> on Fri, 25 Aug 2006 13:18:42 -0400 writes:
>
> Duncan> On 8/25/2006 12:31 PM, Martin Maechler wrote:
> >> This thread remains me of an old recurring (last May!)
> >> theme whic
1) I'd like to take a look at what is involved before commenting on
efficiency issues. They may not be what I thought they were (or at least,
being generic at all may be so big a hit that a few more cases may be
immaterial).
2) This + is clearly not commutative.
3) + is part of group generic.
> "Duncan" == Duncan Murdoch <[EMAIL PROTECTED]>
> on Fri, 25 Aug 2006 13:18:42 -0400 writes:
Duncan> On 8/25/2006 12:31 PM, Martin Maechler wrote:
>> This thread remains me of an old recurring (last May!)
>> theme which maybe fits well to Friday late afternoon...
>>
Yes, that's the essence of the problem: long lines get truncated by the
R-readline interface and so the next line is appended to part of the
previous line (without the closing " in this case).
It works from redirected input because the first chunk is syntactically
incomplete (and --no-readline
I think you have fundamentally missed Prof Ripley's point about using
non-affilated address while requesting help of a substantial nature.
Open-source software doesn't grow on trees.
Often some pieces of open-source software can have substantial
commercial interests, and those who want something
If you plan to do this for certain (non-primitive) "Math" and "Math2"
group functions you will also need setGeneric calls of this form:
setGeneric("log", group="Math")
This much is documented in the "group generic" doc page. What is
undocumented (AFAIK), and tripped me up for a while before
Prof Brian Ripley wrote:
> I've been trying to track down some of the issues with command line length
> limits, and those writing GUIs/front-ends need to pay some attention to
> the issue.
>
> src/unix/system.txt says
>
> *int R_ReadConsole(char *prompt, char *buf, int buflen, int hist)
On 8/25/2006 12:31 PM, Martin Maechler wrote:
> This thread remains me of an old recurring (last May!) theme
> which maybe fits well to Friday late afternoon...
>
> There have been propositions to make "+" work in S (and R)
> like in some other languages,
> namely for character (vectors),
>
If people are annoyed by the off-topic-ness, just let me know and I'll
take it off list. Also, I don't expect to necessarily convert anyone to
my point of view, but I would like to try and articulate it a bit better
(sorry for the length). More inline:
On Thu, 2006-08-24 at 20:23 +0100, Hin-Tak
This thread remains me of an old recurring (last May!) theme
which maybe fits well to Friday late afternoon...
There have been propositions to make "+" work in S (and R)
like in some other languages,
namely for character (vectors),
a + b := paste(a,b, sep="")
IIRC, when this theme cam
hi,
I wrote a simplest c extension to test.
xxx.c
R CMD SHLIB xxx.c
then I run dyn.load('xxx.so'), it worked very well without any question.
but if I compiled it with -lphread,
xxx.c
Makevars with PKG_LIBS=-lpthread
R CMD SHLIB xxx.c
then I run dyn.load('xxx.so'), R crashed.
I run R -d g
> "BDR" == Prof Brian Ripley <[EMAIL PROTECTED]>
> on Fri, 25 Aug 2006 12:56:17 +0100 (BST) writes:
BDR> Just like any other S4 method: setMethod("+",
BDR> c("track", "track"), function(e1, e2) new("track",
BDR> x=c([EMAIL PROTECTED], [EMAIL PROTECTED]), y=c([EMAIL
PROTECT
Just like any other S4 method:
setMethod("+", c("track", "track"),
function(e1, e2) new("track", x=c([EMAIL PROTECTED], [EMAIL
PROTECTED]), y=c([EMAIL PROTECTED],[EMAIL PROTECTED])))
If you want to write a group generic for the S4 Ops group, you do it
very like S3. There are worked e
Hi
I'm trying to implement S4 methods in a package, and I am having
difficulty defining "+" to do what I want.
In the Green Book, there is a discussion of a "track" object,
setClass("track", representation(x="numeric", y="numeric"))
OK.
track1 <- new("track",x=c(1,4,6),y=c(10,11,12))
track2 <-
People often ask for base functions to be made generic. There is a
measurable cost:
> system.time(for(i in 1:1e6)seq(length=5))
[1] 18.603 0.016 18.621 0.000 0.000
> system.time(for(i in 1:1e6) seq.default(length=5))
[1] 12.515 0.012 12.533 0.000 0.000
> system.time(for(i in 1:1e6) NULL)
[
17 matches
Mail list logo