Hi,
Formulas (and other language objects) can be manipulated to some
extent like lists (see the R Language Definition). A formula
corresponds to a 3-element list, where the first argument is the
function `~`, and the next two are the LHS and RHS of the formula,
respectively (for unary use of ~, t
On Wed, 20 Apr 2005 [EMAIL PROTECTED] wrote:
I'm trying to manipulate/change a formula prior to passing it to another
function. A simplified example:
User passes formula to my function: y~x
My function does: lm(transform(y)~x)
Here, transform() is added to the model's response.
What is the best wa
I'd like to second Vincent's appeal.
Before 'head' and 'tail' were added to package:utils, I had
versions that allowed negative subscripts.
And I found the code rendered by them readable and less subject to
mental or typographical errors.
I think all that is needed for the versions in package::
Full_Name: Martha Nason
Version: 2.0.1
OS: Windows XP
Submission from: (NULL) (137.187.154.154)
I am running simulations using fisher's test on 2 x c tables and a very small
p.value from fisher's test (<2.2e-16) is returned as a negative number. Code
follows.
> set.seed(0)
> nreps.outer <-7
> p
Le 20 Avril 2005 16:05, A.J. Rossini a écrit :
> x[-length(x)] ?
I feel idiot from that one, but hold on to my point. ;-)
Better example, then: how about a compact way to drop, say, the last 3
elements of a vector? I think
> tail(x, -3)
would be nicer --- and more readable --- than
> x[-((len
I'm trying to manipulate/change a formula prior to passing it to another
function. A simplified example:
User passes formula to my function: y~x
My function does: lm(transform(y)~x)
Here, transform() is added to the model's response.
What is the best way to accomplish this?
___
Hello,
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of A.J. Rossini
> Sent: Wednesday, April 20, 2005 12:21 PM
> To: Ali -
> Cc: r-devel@stat.math.ethz.ch
> Subject: Re: [Rd] Overloading methods in R
>
> R.oo tries to implement an old-fashioned OO
> I think you are barking up the wrong tree. If you want to use an
> event-driven sub-system you need to run an event loop.
Well, but I only want part of R's event loop, namely handling of some specific
X11-events. Of course, I do have a sort of event-loop, except that the main
category of "event
I think you are barking up the wrong tree. If you want to use an
event-driven sub-system you need to run an event loop.
There is a lot of new information in 2.1.0 on building a front-end.
Please read it.
On Wed, 20 Apr 2005, Thomas Friedrichsmeier wrote:
I'm working on a frontend for R. I have R
Dear R developers,
I'm a former APL programmer. In that language, the "take" (up arrow) and
"drop" (down arrow) operators were extensively used to, well, take and drop
elements of vectors. Functions head() and tail() are equivalents in R for the
"take" operator, but nothing seems to mimic the "
I have built a sequence of eight S4 classes, each of which inherits
from the previous one but adds extra slots.
I have a corresponding generic function for which I have described
methods for each of these classes in a signature with one other
variable. There are also some ad hoc variable outsid
On 4/20/05, Ali - <[EMAIL PROTECTED]> wrote:
> (1) It seems to me that, generally, in R it is not possible to overload
> functions. Is that right?
>
> (2) Assuming that the above is true, or partially true, is there any extra
> packages to handle overloading in R?
>
> (3) Assuming (1) is TRUE and
> "Ali" == Ali - <[EMAIL PROTECTED]>
> on Wed, 20 Apr 2005 15:45:09 + writes:
Ali> Thanks a lot Tony. I am trying to apply the overloading
Ali> to the methods created by R.oo package and,
Ali> unfortunately, R.oo uses S3-style classes; so I cannot
Ali> use the featu
I have built a sequence of eight S4 classes, each of which inherits
from the previous one but adds extra slots.
I have a corresponding generic function for which I have described
methods for each of these classes in a signature with one other
variable. There are also some ad hoc variable outsid
Hi again,
> I figured that the reason for this might be, that R_ProcessEvents () and
> handleEvent () in devX11.c do not get called (of course I might be
> completely wrong?). So I tried calling R_ProcessEvents () manually, but I
> can't get that to link (unresolved symbol R_ProcessEvents).
> Any
"Ali -" <[EMAIL PROTECTED]> writes:
> On the other hand, I caouldn't find a decent OO package which is
> based on S4 AND comes with the official release of R.
The OO system that comes with R and is based on S4 *is* S4. The
challenge is that it is a different way of doing OO as compared to
Java.
Hi,
I'm working on a frontend for R. I have R running in a separate thread in my
application using Rf_initEmbeddedR, and I'm using R_tryEval to run commands
in R (i.e. I don't run the mainloop).
Everything works fine, except the x11-device: I can open x11-windows and paint
to them alright from
R.oo tries to implement an old-fashioned OO system as found in Java,
Python, C++, etc. R's S4 methods implement a nice modern system based
on the generic function approach , dispatch on argument signatures,
which is different.
While the R documentation for S4 classes is quite useful (spanning the
Thanks a lot Tony. I am trying to apply the overloading to the methods
created by R.oo package and, unfortunately, R.oo uses S3-style classes; so I
cannot use the features of S4 methods as you described. On the other hand, I
caouldn't find a decent OO package which is based on S4 AND comes with
If I understand what you are looking for, I believe your assumption (1)
is FALSE, not TRUE as you suspected.
One thing to realize is that "methods" in R are very different to those
in other common "object-oriented" languages such as C++, Java, or
Python. One difference is that methods are not
Please read the comments: that is a random test and fails about 1 in 50.
On Wed, 20 Apr 2005, Conrad Halling wrote:
I compiled R 2.1.0 under Windows XP SP2 as a preliminary to rebuilding a
custom package for use with R 2.1.0. The compile completed successfully, and
I was able to run demo(graphics
Sean,
Thanks, but, I am actually talking about overloading 'methods' and not
'functions', or you may want to answer this question: How to overload
methods in classes created by R.oo package?
On Apr 20, 2005, at 8:16 AM, Ali - wrote:
(1) It seems to me that, generally, in R it is not possible to
I compiled R 2.1.0 under Windows XP SP2 as a preliminary to rebuilding a
custom package for use with R 2.1.0. The compile completed successfully,
and I was able to run demo(graphics) successfully. But make check and
make check-recommended fail.
> version
_
platform i386-pc-mingw32
arch
On Apr 20, 2005, at 8:16 AM, Ali - wrote:
(1) It seems to me that, generally, in R it is not possible to
overload functions. Is that right?
(2) Assuming that the above is true, or partially true, is there any
extra packages to handle overloading in R?
(3) Assuming (1) is TRUE and (2) is FALSE
(1) It seems to me that, generally, in R it is not possible to overload
functions. Is that right?
(2) Assuming that the above is true, or partially true, is there any extra
packages to handle overloading in R?
(3) Assuming (1) is TRUE and (2) is FALSE, can anyone provide some advice on
develop
I need to compile R-2.0.1 on an opteron running suse9.1 and using
portland group compilers. Can you advise me of the environemt variables
I need to set, particulalry the FPICFLAGS.
Thanks,
Julie
---
Dr Julie Harold: University of East A
26 matches
Mail list logo