On Fri, 15 Jun 2007, ronggui wrote:
Dear all,
I would like to model the relationship between y and x. y is binary
variable, and x is a count variable which may be possion-distribution.
I think it is better to divide x into intervals and change it to a
factor before calling
you might use default setting if you use as.factor(y)~x in rpart(), I think.
On 6/15/07, ronggui [EMAIL PROTECTED] wrote:
Dear all,
I would like to model the relationship between y and x. y is binary
variable, and x is a count variable which may be possion-distribution.
I think it is better
Without a reproducible example I can't tell what the problem is
but as a workaround you could print it as a zoo object:
library(its)
library(zoo)
# create an its object
example(its)
ii - its(mat, times)
# print it without using its' print
print(as.zoo(ii))
# or from the command line just
Albrecht, Dr. Stefan (AZ Private Equity Partner)
[EMAIL PROTECTED] writes:
Dear all,
in the package its the print() method does not seem to correctly
work in all circumstances:
My understanding is that one should define only a method for the show
generic for S4 classes and leave print
Setting S4 methods for print() works correctly, as in your examples.
Your first example does not call print(), so it is not suprising that no
method dispatch takes place.
You seem to suppose that such a method should be used for top-level
auto-printing, and it will not be as your example
I don't know of R code per se, but
Check papers in the econometric literature by Heckman.
And another good recent reference: Stat. Med. 2005 Jul 30;24(14):2197-212.
On the use of discrete choice models for causal inference
Rusty Tchernis1;?; ?, Marcela Horvitz-Lennon2; 3 and Sharon-Lise T.
On Fri, 18 Nov 2005, Ulrike Grömping wrote:
From: Duncan Temple Lang [EMAIL PROTECTED]
[...]
For the record, the problem you are experiencing is that
you are not using the same argument names in your
method as the function $ uses. Hence there is a mismatch.
Use
setMethod($,
Temple Lang [EMAIL PROTECTED], r-help@stat.math.ethz.ch
Sent: Tue, 22 Nov 2005 08:39:32 + (GMT)
Subject: Re: [R] Method for $
On Fri, 18 Nov 2005, Ulrike Grömping wrote:
From: Duncan Temple Lang [EMAIL PROTECTED]
[...]
For the record, the problem you are experiencing is that
you
Ulrike Groemping [EMAIL PROTECTED] wrote:
I have defined a class myclass and would like the slots to be extractable
not only by @ but also by $. I now try to write a method for $ that
simply executes the request [EMAIL PROTECTED], whenever someone calls
object$slotname for any object of class
Ulrike Grömping wrote:
Dear R experts,
I have defined a class myclass and would like the slots to be extractable
not only by @ but also by $. I now try to write a method for $ that
simply executes the request [EMAIL PROTECTED], whenever someone calls
object$slotname for any object of
Ulrike == Ulrike Grömping [EMAIL PROTECTED]
on Fri, 18 Nov 2005 15:37:58 +0100 writes:
Ulrike Dear R experts,
Ulrike I have defined a class myclass and would like the
Ulrike slots to be extractable not only by @ but also by $.
hmm, I know this is not what you've asked for, but
,
Ulrike Grömping
-- Original Message ---
From: Uwe Ligges [EMAIL PROTECTED]
To: Ulrike Grömping [EMAIL PROTECTED]
Cc: r-help@stat.math.ethz.ch
Sent: Fri, 18 Nov 2005 17:45:40 +0100
Subject: Re: [R] Method for $
Ulrike Grömping wrote:
Dear R experts,
I have defined
: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Uwe Ligges
Sent: Friday, November 18, 2005 8:46 AM
To: Ulrike Grömping
Cc: r-help@stat.math.ethz.ch
Subject: Re: [R] Method for $
Ulrike Grömping wrote:
Dear R experts,
I have defined a class myclass and would like the slots
Grömping [EMAIL PROTECTED]
Cc: r-help@stat.math.ethz.ch
Sent: Fri, 18 Nov 2005 18:29:27 +0100
Subject: Re: [R] Method for $
Ulrike == Ulrike Grömping [EMAIL PROTECTED]
on Fri, 18 Nov 2005 15:37:58 +0100 writes:
Ulrike Dear R experts,
Ulrike I have defined a class myclass
Grömping [EMAIL PROTECTED]
Cc: r-help@stat.math.ethz.ch
Sent: Fri, 18 Nov 2005 17:45:40 +0100
Subject: Re: [R] Method for $
Ulrike Grömping wrote:
Dear R experts,
I have defined a class myclass and would like the slots to be
extractable
not only by @ but also by $. I now try
-- Original Message ---
From: Duncan Temple Lang [EMAIL PROTECTED]
To: Ulrike Grömping [EMAIL PROTECTED]
Cc: Uwe Ligges [EMAIL PROTECTED], r-help@stat.math.ethz.ch
Sent: Fri, 18 Nov 2005 10:26:51 -0800
Subject: Re: [R] Method for $
-BEGIN PGP SIGNED MESSAGE-
Hash
PROTECTED], 'Ulrike Grömping'
[EMAIL PROTECTED]
Cc: r-help@stat.math.ethz.ch
Sent: Fri, 18 Nov 2005 09:42:12 -0800
Subject: RE: [R] Method for $
I believe that a recommended S4 convention is simply to write methods for
slot extraction with the same name as the slot. Thus, for an object,x
If you are using S4 classes/methods you can just do
setGeneric(union)
and that converts union() into an S4 generic function. Then you can use
setMethod() to create a union() method for your own objects. I think
the original union() in the base package because the default method.
-roger
There is nothing to stop you using these names, you just need
to be aware that you would be hiding the base definitions. Though
these could always be accessed using the double colon operator,
e.g. base::subset, you might indeed get very unexpected results
if some function called subset()
On Wednesday 20 August 2003 15:44, Shengqiao Li wrote:
Hi, R guys:
I'm using L-BFGS-B method of optim for minimization problem. My function
called besselI function which need non-negative parameter and the besselI
will overflow if the parameter is too large. So I set the constraint box
which
Thanks.
log.arg worked to make sure nonnegative value. But the other side
is overflow. Beyond the upper limit, the exp(arg) is large and bessel
overflows even if exponentially scaled one is used. This will happen at
1/500 chance. Due to I'm doing 10,000 simulations, this problem blocked
me.
Hope this bug will be fixed in the future.
Li
On Wednesday 20 August 2003 15:44, Shengqiao Li wrote:
Hi, R guys:
I'm using L-BFGS-B method of optim for minimization problem. My function
called besselI function which need non-negative parameter and the besselI
will overflow if the
I see two problems, which I handle differently:
First, if arg must be nonnegative, I program fn in terms of log.arg,
so it can never become nonpositive.
Second, is besselI always positive? If yes, then program fn to
compute log(besselI) and use that. Standard references such as
On Sat, 19 Jul 2003, Neil Osborne wrote:
I am using the R ActiveX component (v1.2). I have written a custom function
in R which returns a dataframe. I want to be able to retrieve the contents
of the returned dataframe in my application.
Here is a snippet of the code (line that throws
24 matches
Mail list logo