similar to: setIs?

Displaying 20 results from an estimated 3000 matches similar to: "setIs?"

2005 Nov 22
1
failure in `setClass' examples
Hello, Below is what I got running the examples from `setClass'. Could somebody please help explain why the last `setIs' call is returning the warning and whether this is expected? R> setClass("track", + representation(x="numeric", y="numeric")) [1] "track" R> setClass("trackCurve", +
2003 Apr 01
1
setGeneric
I'm still having difficulties with methods...is the following behavior expected? (This is without loading any libraries) R : Copyright 2003, The R Development Core Team Version 1.7.0 Under development (unstable) (2003-03-31) > ls() character(0) > > diag(2) [,1] [,2] [1,] 1 0 [2,] 0 1 > setGeneric("diag") [1] "diag" > diag(2) Error in
2008 Mar 17
1
setAs vs setIs
Hi the list I am fighting with the twins setAs and setIs... Here are some questions and comments (comments to myself but that migth be wrong, it is why I am posting them) 1. Very surprising : using setIs define 'is', 'as<-' but not 'as' ??? 2. Using setAs define 'as', 'as<-' but not 'is'... What surprise me is that as<- can be define by
2006 Apr 07
4
setIs and method dispatch in S4 classes
Dear all, I have a question regarding setIs and method dispatch in S4 classes: Consider the following example: ##################################################### ## A02 "contains" A01 by setIs: setClass("A01", representation(a="numeric",b="numeric")) setClass("A02", representation(a="numeric",d="numeric"))
2007 Jul 16
1
S4 coerce
(I am not sure if this is a bug or a request for a more understandable warning, or possible something obvious I should be posting on r-help.) I am trying to coerce an new class object to be a DBIConnection and it does not work the way I think it should: R version 2.5.1 (2007-06-27) ... > require("RMySQL") # or require("RSQLite") Loading required package: RMySQL Loading
2003 Mar 26
0
Rprof/UseMethod
I'm having difficulty with Rprof. I have a documentation example test.qss that runs fine without profiling, but under Rprof, > Rprof() > source("test.qss") Error in standardGeneric("model.matrix") : UseMethod used in an inappropriate fashion Luke wrote about a similar circumstance last summer: # From: Luke Tierney (luke@stat.umn.edu) # Date: Fri Jul
2004 Oct 08
0
user interface and documentation of setIs and setAs, some suggestions (S4).
By reading the documentation for _setIs_ I noted that for the same object three different names are used. 1) the name of the first argument in the functions coerce and replace in setIs must be _obj_ (see example section or) setIs("MVCa","list",coerce=function(obj){obj@list},replace=function(obj,value){obj@list<-value}) 2) At the same time in the usage section:
2004 Oct 25
1
usage and behavior of 'setIs'
Hello, am I using 'setIs' in the correct way in the subsequent (artifical) example? Do I have to specify explicit 'setAs' for 'list' and 'vector' or should this work automatically, since "getClass("List1")" states an explicit coerce also for these classes. I'm working with R 2.0.0 Patched (2004-10-06) on windows 2000. Thanks for your
2003 Mar 17
1
What does is() mean?
Suppose you have a class, say sex, for lack of a better example, and you are tempted, in defining the behavior of the call, is(x,"sex") to check whether certain basic features are satisfied, not to just trust the claim that x is specified to be of class "sex". `Without delving into details further sanity checking of the structure of the object is sometimes prudent to avoid
2003 Feb 06
1
make fails for 1.7.0 on mac os x 10.1
I've been running a binary installation (kindly provided by Jan de Leeuw) on mac G4, but was inspired this morning to try to install 1.7.0 on the G4 as well as on my desktop solaris box. This worked smoothly on my solaris system but on the G4 the make dies shortly after compiling lapack with: /usr/bin/libtool: internal link edit command failed make[4]: *** [libRlapack.dylib] Error 1 make[3]:
2003 Mar 10
4
terms.formula
I'm in the very initial stage of expanding the formula processing in my quantile regression function rq() to handle additive nonparametric components, say qss(x), or qss(x,z). I need some advice about strategy for formula processing. My initial foray was to use: terms(formula,specials="qss") and then modify the components of the resulting terms.object. But in changing formula
2003 Jun 23
3
FW: S4 classes, creating in C
I am using C code to create an S4 object based on Douglas Bates's example in his lecture notes on <http://www.ci.tuwien.ac.at/Conferences/DSC-2003/Tutorials/RExtensions/slide s.pdf> http://www.ci.tuwien.ac.at/Conferences/DSC-2003/Tutorials/RExtensions/slides .pdf e.g. SEXP La_DGE_dc(SEXP A) { SEXP aa = PROTECT(duplicate(A)); SEXP adims, pivot, val; int
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
2003 Sep 02
1
completeSubclasses() methods bug (PR#4051)
Full_Name: Colin A. Smith Version: 1.8.0 OS: Mac OS X 10.2.6 Submission from: (NULL) (128.102.184.81) annaffy 1.0.1 (in BioC CVS) fails to load. annaffy 1.0 (on the BioC web site) has the same problem. It looks like the load is failing because of a bug in completeSubclasses() in r-devel. It calls setIs() and doesn't specify an environment via the "where" argument. setIs()
2004 Oct 08
1
Function _coerce_ in _setIs_ never entered (S4).
Hi, Please consider the following trivial example. In the sample code I first define a class MVCa using composition. This class contains a slot of type list. Next I define an inheritance relation using the function setIs -> MVCa "is a" list. Then I define a function printlength which prints the list-length which is defined for the type "list". If I call this function
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 > >
2003 May 30
2
Creating a vector class
I'm trying to create a package for working on orientation data, i.e. data where the observations are 3D rotations. There are several different representations of orientations in common use: SO(3) matrices, Euler angles, unit quaternions, etc. One thing I'd like is to make it convenient to work in any representation, and have conversions to others done as needed. I'm trying to do
2008 Nov 26
1
S4 slot containing either aov or NULL
Dear listmembers, I would like to define a class with a slot that takes either an object of class aov or NULL. I have been reading "S4 Classes in 15 pages more or less" and "Lecture: S4 classes and methods" #First I tried with list and NULL setClass(listOrNULL") setIs("list", "listOrNULL") setIs("NULL", "listOrNULL") #doesn't
2003 Jun 13
1
Problem with Rcmd check and S4 methods
In the little orientation data package I'm working on, the very first example fails, even though the same code works when used in a regular session. In my experience, this usually indicates T or F has been used instead of TRUE or FALSE, but that's not the case this time. The error message is > x <- eulerzyx(1,0,0) Error: Trying to get slot "validity" from an object of
2008 Mar 26
5
S4 slot with NA default
Hi How do I specify an S4 class with a slot that is potentially numeric, but NA by default? I want the slot to be NA until I calculate its value (an expensive operation, not needed for all applications). When its value is known, I will create a new object with the correct value inserted in the slot. I want "NA" to signify "not known". My attempt fails because