Hi,
Any idea why S4 doesn't allow slots of type "double"?
> setClass("A", representation(a="double"))
Error in makePrototypeFromClassDef(properties, ClassDef, immediate, where) :
in making the prototype for class "A" elements of the prototype failed to
match the corresponding slot class:
Dear all,
what is the proper way to make the assignment operator generic and define
methods depending on the class of the assigned value?
Best regards
Jens Oehlschlägel
P.S. I vaguely remember that this was possible in S+. In R I tried to no avail:
# using this like h<-1:3 gives Error: in
are you looking for "setReplaceMethod"?
hth
Matthias
Jens Oehlschlägel wrote:
> Dear all,
>
> what is the proper way to make the assignment operator generic and define
> methods depending on the class of the assigned value?
>
> Best regards
>
>
> Jens Oehlschlägel
>
> P.S. I vaguely remember that
I think the question is not about setReplaceMethod, here is the idea:
## setReplaceMethod-like situation:
> names(x) <- c("a","b")
## the question of interest
> class(x)
[1] myClass
> y <- x ## this to run a user-defined clone method for class 'myClass'
Why is this important - if x contains da
Thanks Matthias,
> are you looking for "setReplaceMethod"?
So far the package I m writing has avoided using anything from S4 and the
implications of touching S4 are not clear to me. The package aims on providing
an alternative to 'atomic' data stored in ram, i.e. large atomic data stored on
di
On Nov 13, 2007, at 3:36 AM, [EMAIL PROTECTED] wrote:
> Any idea why S4 doesn't allow slots of type "double"?
>
Type (as in storage type and "double" is a storage type) has nothing
to do with classes. You cannot create slots for types, only for classes.
>> setClass("A", representation(a="dou
On Nov 13, 2007, at 9:19 AM, Jens Oehlschlägel wrote:
> Thanks Matthias,
>
>> are you looking for "setReplaceMethod"?
>
> So far the package I m writing has avoided using anything from S4
> and the implications of touching S4 are not clear to me. The package
> aims on providing an alternative
On Tue, 13 Nov 2007, "Jens Oehlschlägel" wrote:
Thanks Matthias,
are you looking for "setReplaceMethod"?
So far the package I m writing has avoided using anything from S4 and
the implications of touching S4 are not clear to me. The package aims on
providing an alternative to 'atomic' data
Check out the g.data package in case that's what you are looking for. It
uses promises until the data is actually used.
On Nov 13, 2007 9:19 AM, "Jens Oehlschlägel" <[EMAIL PROTECTED]> wrote:
> Thanks Matthias,
>
> > are you looking for "setReplaceMethod"?
>
> So far the package I m writing has a
On Tue, 13 Nov 2007, Simon Urbanek wrote:
>
> On Nov 13, 2007, at 3:36 AM, [EMAIL PROTECTED] wrote:
>
>> Any idea why S4 doesn't allow slots of type "double"?
>>
>
> Type (as in storage type and "double" is a storage type) has nothing
> to do with classes. You cannot create slots for types, only f
Thank you Brian,
> setReplaceMethod() is just syntactic sugar for setting an S4 method on a
> replacement function (read the function definition to see so). You can
> set S3 replacement methods, and the S4 mechanism just piggy-backs on that.
So I understand that setReplaceMethod will not help.
Thanks Simon,
> You cannot use S3 here, because you want to dispatch on the *second*
> argument.
"<-" <- function(x, value)UseMethod("<-", value)
DOES dispatch on the second argument (see the dispatchsecond example below)
> Why don't you take the external pointer approach that many others take
Thanks Simon,
> You cannot use S3 here, because you want to dispatch on the *second*
> argument.
"<-" <- function(x, value)UseMethod("<-", value)
DOES dispatch on the second argument (see the dispatchsecond example below)
> Why don't you take the external pointer approach that many others take
What's the proposal here? To eliminate "double" as a class? No
objection from this corner. As I remember, it was put in early in the
implementation of methods, when I was confused about what R intended in
this area (well, I'm not totally unconfused even now).
If this is the proposal, we coul
On Tue, 13 Nov 2007, John Chambers wrote:
> What's the proposal here? To eliminate "double" as a class? No objection
Eliminate "double" and "single".
> from this corner. As I remember, it was put in early in the implementation
> of methods, when I was confused about what R intended in this a
On Tue, 13 Nov 2007, "Jens Oehlschlägel" wrote:
Thank you Brian,
setReplaceMethod() is just syntactic sugar for setting an S4 method on a
replacement function (read the function definition to see so). You can
set S3 replacement methods, and the S4 mechanism just piggy-backs on that.
So I un
Hello list
Thank you for your help with the d-p-q-r-tests on Irix.
After patching d-p-q-r-tests.R, and d-p-q-r-tests.Rout.save file to
reflect the
change, d-p-q-r tests succeed but make check still fails:
> comparing 'complex.Rout' to './complex.Rout.save' ...188c188
> < [1] 0+0i
> ---
> > [1
The perl-related warnings have gone in R-devel: we now take the view that
since we need perl to make the test suite, perl >= 5.8.0 is compulsory.
(5.6.1 is now over 7 years' old, and 5.8.0 is more than 5.)
The make check failure is in reg-tests-1.R and so will show up in
reg-tests-1.Rout.fail.
Hello List, Prof Brian Ripley
How would the inefficiencies in IEC60559 arithmetic handling affect a
user,
Slow computations or compromised data and calculations?
Here are the last 50 lines of the reg-tests-1.Rout.fail file.
> [EMAIL PROTECTED]:70# tail -50 reg-tests-1.Rout.fail
> > ## first tw
On Tue, 13 Nov 2007, kamil Marcinkowski wrote:
> Hello List, Prof Brian Ripley
>
> How would the inefficiencies in IEC60559 arithmetic handling affect a user,
> Slow computations or compromised data and calculations?
Just a loss of accuracy. There have been systems in which using extreme
values
20 matches
Mail list logo