Displaying 20 results from an estimated 1000 matches similar to: "removing union class"
2013 May 08
1
Namespace/inheritance problem in S4 methods for a union class
Hi,
I started this post on bioc-devel but this seems to be more general:
https://stat.ethz.ch/pipermail/bioc-devel/2013-May/004311.html
See reproducible example from Martin below.
Thank you.
Renaud
---------- Forwarded message ----------
From: Martin Morgan <mtmorgan at fhcrc.org>
Date: 7 May 2013 19:55
Subject: Re: [Bioc-devel] ExpressionSet and LumiBatch: inheritance problem
in S4
2009 Oct 26
1
How to browse all the functions in a package?
'?removeClass' shows that 'removeClass' is from package
'package:methods'. Is there a command which can show me all the
functions and the classed defined in a package such as
'package:methods'?
2020 Oct 05
2
S4 - inheritance changed by order of setClassUnion and setAs()
Dear colleagues,
there is a behaviour with S4 (virtual) classes that I find very hard to understand: Depending on the position
of setAs(), the tree of inheritance changes.
This is my baseline example that defines the classes "grandma", "mother", "daughter" and a virtual
class "mr_x". For a new instance if "daughter", "mr_x" is betweeen
2009 Feb 11
1
setClassUnion with numeric; extending class union
Dear list:
I am looking for a good way to create an S4 class that would extend
numeric, but would allow NULL instead of data as well. As far as I can
see there is no way at the moment to do that, but please correct me if I
am wrong. The best solution I came up with so far was the following (it
also indicates a problem of using setClassUnion with numeric as one of
the classes):
I define a class
2020 Sep 23
3
Is it possible to simply the use of NULL slots (or at least improve the help files)?
As far as I can tell, there's no trivial way to set arbitrary S4 slots to NULL.
Most of the online examples I can find, use setClassUnion and are
about 10 years old.
Which, in my opinion, is defective.
There's nothing "robust" about making something that should be
trivially simple, really complicated.
Maybe there is a simpler way, and I just haven't worked it out, yet.
But
2019 Nov 11
2
Troubles using numeric in s4 class union
Hi all,
I came across an issue in using the Matrix package which made it that I
could only subset Matrices using the numeric class, but could not using
integers. Steps to reproduce the problem:
library(Matrix)
# this class has *nothing* to do with Matrix
setClass("MyClass",
representation(myvalue = "numeric"),
prototype(myvalue = NA_real_))
# this class also has
2016 Mar 18
2
unary class union of an S3 class
Hi,
Short story
-----------
setClassUnion("ArrayLike", "array")
showClass("ArrayLike") # no slot
setClass("MyArrayLikeConcreteSubclass",
contains="ArrayLike",
representation(stuff="ANY")
)
showClass("MyArrayLikeConcreteSubclass") # 2 slots!!
That doesn't seem right.
Long story
----------
2016 Mar 19
2
unary class union of an S3 class
On 03/18/2016 03:28 PM, Michael Lawrence wrote:
>
> On Fri, Mar 18, 2016 at 2:53 PM, Herv? Pag?s <hpages at fredhutch.org
> <mailto:hpages at fredhutch.org>> wrote:
>
> Hi,
>
> Short story
> -----------
>
> setClassUnion("ArrayLike", "array")
>
> showClass("ArrayLike") # no slot
>
>
2016 Mar 19
2
unary class union of an S3 class
On 03/19/2016 01:22 AM, Michael Lawrence wrote:
>
>
> On Sat, Mar 19, 2016 at 12:10 AM, Herv? Pag?s <hpages at fredhutch.org
> <mailto:hpages at fredhutch.org>> wrote:
>
> On 03/18/2016 03:28 PM, Michael Lawrence wrote:
>
>
> On Fri, Mar 18, 2016 at 2:53 PM, Herv? Pag?s
> <hpages at fredhutch.org <mailto:hpages at
2006 Oct 06
1
class unions?
the code below has me confused:
setClassUnion("index", c("numeric", "character", "logical"))
extends("numeric") # i don't see the class union
library(Matrix)
extends("numeric") # now i see the class union
i am aware that the "Matrix" package separately defines the "index"
class union.
is it the case that
2015 Jan 21
2
reducing redundant work in methods package
Hi all,
The function call series genericForPrimitive -> .findBasicFuns -> .findAll
happens 4400 times while the GenomicRanges package is loading. Each time
.findAll follows a chain of environments to determine that the methods
namespace is the only one that holds a variable called .BasicFunsList. This
accounts for ~10% of package loading time. I'm sure there is some history
to that
2004 Jan 09
1
pb with install
dear all,
I try to update my Rversion fro 1.7.1 to 1.8.1 on linux. I have a problem
when I try to install pacakges from Bioconductors with :
source("http://www.bioconductor.org/getBioC.R")
and
getBioC(relLevel="release")
somme errors append and when I make a library(affy) for example I obtain :
> library(affy)
Error in setIs("character",
2015 Jan 21
2
reducing redundant work in methods package
Doing it like this:
genericForPrimitive <- function(f, where = topenv(parent.frame()), mustFind
= TRUE) {
ans = .BasicFunsList[[f]]
## this element may not exist (yet, during loading), dom't test null
if(mustFind && identical(ans, FALSE))
stop(gettextf("methods may not be defined for primitive function %s
in this version of R",
2015 Nov 04
1
setOldClass("xts")
Hello,
I apologize that I am cross posting here after getting no answer from
my initial
question on stack overflow
<http://stackoverflow.com/questions/33492601/r-setoldclass-only-if-needed>.
I should certainly have posted it first here..
I am using 3 packages:
- xts
- quantmod
- 'myPackage'
quantmod is creating a union class by doing:
setOldClass("xts");
2005 Feb 03
3
Reading Dates in a csv File
Hi all. I'm reading in a flat, comma-delimited flat file using read.csv.
It works marvelously for the most part. I am using the colClasses argument
to, basically, create numeric, factor and character classes for the columns
I'm reading in. However, a couple of the fields in the file are date
fields. I'm fully aware that POSIXct can be used as a class, however the
field must obey,
2020 Feb 18
2
Possible Regression in setClassUnion between 3.5.0 and 3.6.0
I am trying to create a class union of class unions to facilitate method
dispatch. When I execute code in the global environment, everything acts as
expected, however when I put the same code in the context of a package,
selectMethod can no longer find the correct method. This first block below
puts the code in the context of a package:
fn <- "codefile.R"
writeLines(
c(
2004 Oct 14
2
setClassUnion
Hello,
I have a question concerning "setClassUnion".
I'm working with R 2.0.0 Patched (2004-10-06) on windows 2000.
I tried to use "setClassUnion" in a package I am currently working on. The
situation is similar to the following example:
The DESCRIPTION file has entries:
Depends: R (>= 2.0.0), methods
Imports: methods
LazyLoad: yes
The NAMESPACE file has
2004 Oct 14
2
setClassUnion
Hello,
I have a question concerning "setClassUnion".
I'm working with R 2.0.0 Patched (2004-10-06) on windows 2000.
I tried to use "setClassUnion" in a package I am currently working on. The
situation is similar to the following example:
The DESCRIPTION file has entries:
Depends: R (>= 2.0.0), methods
Imports: methods
LazyLoad: yes
The NAMESPACE file has
2020 Feb 19
2
Possible Regression in setClassUnion between 3.5.0 and 3.6.0
Thanks, I'll look into it.
On Tue, Feb 18, 2020 at 8:32 AM Ezra Tucker <ezztucker at gmail.com> wrote:
>
> Hi Robert,
>
> This looks like a bug to me (tested in R 3.6.2 on Windows), f(new("a"))
> should return "hi!". I'll add that this DOES work properly in 3.6.1
> which leads me to suspect this could be due to the subtle change in the
> way
2006 Apr 12
1
yet another problem with S4 dispatch (with setClassUnion)
Dear John and Seth, dear R-devels,
once again the question of method dispatch in S4 -- this time with
setClassUnion(); taking up your advice in
https://stat.ethz.ch/pipermail/r-devel/2006-April/037200.html
https://stat.ethz.ch/pipermail/r-devel/2006-April/037201.html
I have been too quick in stating that
>setClassUnion()---at least in my case---solves the problem;
>
The problem arises