similar to: package slot of generic "[" and missing env@target?

Displaying 20 results from an estimated 1000 matches similar to: "package slot of generic "[" and missing env@target?"

2010 Feb 02
2
Error with R CMD check - Packages required but not available:
Hi All, Apologies in advance if this is not the right email to post this question. I successfully created my first R package myPackage1. Now I want to create another R package myPackage2 which requires functions from myPackage1. However when I try R CMD check myPackage2 I get the following error * checking for working pdflatex ... OK * using log directory
2018 Jan 29
2
bug [methods]: double execution of `insertSource` within the same session does not work
Hello everyone, I hope this reaches someone at all. It's my first bug report to the R-core, and, apparently, bugzilla is locked from new reports for now. I was using `methods::insertSource` to debug and successfully fix another package, until it suddenly stopped working. I figured out, that it is because I am using it on the same function multiple times within one session. It also produces
2007 Mar 30
2
Replacing slot of S4 class in method of S4 class?
Dear all, Assume that I have an S4 class "MyClass" with a slot "myname", which is initialized to: myname="" in method("initialize"): myclass <- new("MyClass", myname="") Assume that class "MyClass" has a method "mymethod": "mymethod.MyClass" <- function(object, myname=character(0), ...) {
2008 Dec 22
1
How to add a slot to S4 class of an existing package?
Dear all, Since my package is based on S4 classes, I would like to know how to add a slot to an existing S4 class without breaking the code of users of my package. Assume the following S4 class: setClass("MyClass", representation(name = "character", type = "character", data = "data.frame" ), prototype(name =
2011 Oct 22
1
setMethod "[" - extract by names within Slot
Hi R-helper! I have problem with setMethods for "[". Here is example : setClass("myClass", representation(ID.r = "numeric", ID.c = "character", DAT = "matrix")) to.myClass <- function(ID.r, ID.c, DAT) {     out <- new("myClass", ID.r = ID.r, ID.c = ID.c, DAT = DAT)     return(out)       }       setMethod("[",
2004 Oct 06
1
R 2.0.0: namespaces, S4 classes & versioned package installation: failure to resolve correct pkg version
Hi, further down from the problem I asked about yesterday I encounter the following problem (please appologize for the lengthy mail - I have not found a brief example making the issue clear): - using R packages making use of namespaces & - S4 classes when using --with-package-versions in the install call: Pkgs install ok and the first pkg 'base' can be loaded in R
2004 Sep 03
0
Changing the value of an object's slot in a method
Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Received-SPF: none (hypatia: domain of tofesi at web.de does not designate permitted sender hosts) X-Virus-Scanned: by amavisd-new at stat.math.ethz.ch X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on hypatia.math.ethz.ch X-Spam-Level: X-Spam-Status: No, hits=0.2 required=5.0
2019 Sep 27
0
missing imports not detected by 'R CMD check' (?)
>>>>> Henrik Bengtsson >>>>> on Tue, 24 Sep 2019 11:42:13 -0700 writes [to me (as maintainer of 'Matrix') and allowed me to answer in public] : > I ran into a problem where 'R CMD check' on my in-house package, which > only indirectly depends on 'Matrix', produce errors like: > > [where=<environment: namespace:Matrix>,
2018 Jan 29
0
bug [methods]: double execution of `insertSource` within the same session does not work
Thanks, I will fix this. On Mon, Jan 29, 2018 at 8:06 AM, Demetrio Rodriguez T. < demetrio.rodriguez.t at gmail.com> wrote: > Hello everyone, > > > I hope this reaches someone at all. It's my first bug report to the R-core, > and, apparently, bugzilla is locked from new reports for now. > > I was using `methods::insertSource` to debug and successfully fix another
2005 Dec 07
1
Dots argument in apply method
Hello everyone, I'm working on a package using S4 classes and methods and I ran into the following "problem" when I tried to create an "apply" method for objects of one of my new classes. I've found a way around the problem but I wonder if I did not paint myself into the corner. I'd like your opinion about that. So I have an object "myObj" of class
2011 Oct 31
1
Question about copying reference objects using the initialize method
Dears, I have a question about copying reference objects using the initialize method. 1) If the latter has no arguments, there is no problem to copy an object. myClass = setRefClass("myClass", fields = list(value = "numeric") ) myClass$methods(initialize = function(...){ ? value <<- 1 ? callSuper(...) }) newObject = myClass$new() newObject$value = 2 copyObject =
2012 Jul 19
0
[LLVMdev] Supporting Classes using OCaml.
Hello all... I'm trying to create a simple language that supports classes using the OCaml API. When I use the web page demo to produce the intermediate code for the following C++ example ... class MyClass { public: MyClass(); int c; }; MyClass::MyClass () { c=55; } ...I get something like this .... %class.MyClass = type { i32 } @MyClass::MyClass() = alias void (%class.MyClass*)*
2009 Jan 02
1
"registering" a generic method for a class
Sorry in advance if this is too simple a question, but I'm stuck with some odd behavior and I can't find the text to rid myself of this (admittedly somewhat trivial) problem. Note that I've done generic programming with S3 "objects" in the past, but I've never really dabbled in creating S4 objects until now. So, I've created a new S4 class, call it
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
2011 Sep 22
1
R.oo: do work on data member at construction
Hello, I'd like to 'do work' on data members upon construction (i.e. without implementing it in a get method). Is this the best way to create data member 'z' upon construction? I'm thinking if .z=paste(x,y) below gets more complex I'll run into issues. setConstructorS3("MyClass", function(x=NA,y=NA,...) { this <- extend(Object(), "MyClass",
2008 May 13
0
'cat' and 'write' as generic, just like 'c', 'cbind' etc?
Dear list: is there any good reason why 'c', 'cbind', 'rbind' etc (all defined as 'function(..., <rest>)') are generic and thus methods can be defined whereas such quite useful functions like 'cat' and 'write' are not? Would it not be reasonable to add such functionality? This would allow to define S3/S4 methods for cat and write for complex
2019 Jul 15
0
[External] Re: Possible bug in `class<-` when a class-specific '[[.' method is defined
Pasting the entire example into RStudio and hitting return to evaluate does not show this. Evaluating the finall line to print counttt separately does. Looks like RStudio is calling `[[` on your object when examining the environment for the Environment panel. If this concerns you then you should contact RStudio. Best, luke On Mon, 15 Jul 2019, Rui Barradas wrote: > Hello, > > Clean R
2005 Jun 02
1
showMethods doubt
Hi, I'm developing in S4 and I wanted to see the methods for a specific class using showMethods but I didn't succed. Can someone help ? See the example below. setClass("myclass", representation( name ="character" ) ) setGeneric("mymeth", function(obj, ...){ standardGeneric("mymeth") } ) setMethod("mymeth",
2011 Jun 06
1
Seeking help to define method for show() for an S4 object
Dear all, I have created a new S4 class with name "MyClass". Please see below for it's definition. Now I want to create a method for the show() function for this class. In defining this method, what I want is, once user would like see an object of this class some values will be displayed. Then R will ask for **press Enter**. Once user presses enter then, remaining values will be
2020 May 12
0
S3 method dispatch for methods in local environments
Dear Wolfgang, I think this new behaviour is related to the following R 4.0.0 NEWS item: > S3 method lookup now by default skips the elements of the search path between the global and base environments. Your environment "myenv" is attached at position 2 of the search() path and thus now skipped in S3 method lookup. I have just noticed that