similar to: WG: Reference classes: error with missing arguments in method calls

Displaying 20 results from an estimated 2000 matches similar to: "WG: Reference classes: error with missing arguments in method calls"

2011 Feb 20
0
Reference classes: error with missing arguments in method calls
Dear list, I'm having problems in understanding an error that pops up in the context of missing arguments with methods of reference class objects. Because of the following statement taken from '?referenceClass', my ref class methods call explicit S4 methods: "Reference methods should be kept simple; if they need to do some specialized R computation, that computation
2011 Aug 30
1
Why does loading saved/cached objects add significantly to RAM consumption?
Dear list, I make use of cached objects extensively for time consuming computations and yesterday I happened to notice some very strange behavior in that respect: When I execute a given computation whose result I'd like to cache (tried both saving it as '.Rdata' and via package 'R.cache' which uses a own filetype '.Rcache'), my R session consumes about 200 MB of
2011 Jun 10
2
Require of gWidgetsRGtk2 fails: RGtk2.dll can't be found, but it's there
Dear list, I've been trying to get gWidgets/gWidgetsRGtk2 to run every other month for a while, but somehow I simply can't figure out what's going wrong. I tried several distributions of the GTK runtime environment for Windows (http://downloads.sourceforge.net/gladewin32/gtk-2.12.9-win32-1.exe as described in the package's vignette,
2011 Apr 14
1
Possible bug in 'relist()' and/or 'as.relistable()'
Dear list, I think I just stumbled across a bug in either 'relist()' and/or 'as.relistable()'. It seems that 'pairlists' can only be un- and relisted as long as they're not nested: Good: a <- as.relistable(as.pairlist(list(a=1, b=2))) a <- unlist(a) relist(a)# Works Bad: a <- as.relistable(as.pairlist(list(a=1, b=2, c=list(c.1=1, c.2=2)))) a <- unlist(a)
2010 Nov 17
2
Reference classes: accessor functions via 'getRefClass(...)$accessors(...)'
Hi there, I''d like to choose between an "static" and "dynamic" access of a reference class field, say ''a''. myObj <- getRefClass("Blabla")$new() Static: myObj$a Dynamic: myObj$a.get() where the function retrieves the data from a database (or some other location), stores it to a buffer and
2011 Jun 03
2
Bug or feature: using "ANY" as a generic field class (was: '[R] Is there a (virtual) class that all R objects inherit from?)
Dear list, I was wondering if you could help me out in clarifying something: Is it possible to use class "ANY" in slots/fields of formal classes if you a) do not want to restrict valid classes of that field and b) if you are making explicit use of class inheritance? It seems to work in simple scenarios but produces errors when class inheritance comes into play. So I was
2010 Nov 04
2
Roxygen: @example tag does not work for me
Dear list, somehow I can't get the Roxygen tag "@example" to work for me. My "Roxygen-Header" of a script containing, say, a function looks like this: #' My header #' #' My description #' #' @param a Blabla. #' @param b Blabla. #' @return \code{TRUE}. #' @callGraphPrimitives #' @references #'
2010 Nov 21
1
reference classes: question on inheritance
Dear list, I have a reference class which should act as a "generic" superclass for other classes. I've read the respective section at ?setRefClass and put the name of the superclass to the 'contains' argument of an example subclass (see class defs below). Classnames are set in a way that shouldn't result in collation issues (virtual def sourced before superclass def
2011 Jun 06
1
How can I write methods for 'as()'?
Dear list, I wonder how to write methods for the function 'as' in the sense that I can call 'as(object, Class, strict=TRUE, ext)' and let method dispatch figure out the correct method. AFAIU, there is a difference between, e.g. 'as.data.frame' and the methods of 'as()' as stated above since the former depends on arg 'x' instead of 'object',
2010 Nov 23
1
Reference Classes: removing methods -> implications for objects/instances of that class
Dear list, just to make sure that I understand 'unregistering' methods for S4 reference classes correctly: If I registered a method and want to 'unregister' (i.e. remove) this method again, objects/instance created of the respective class still feature the removed method until I do an explicit reassign ('my.instance <- getRefClass("Classname")$new()'), right?
2010 Jan 15
1
Can an object reference itself?
Dear List, I am not really familiar with any other language than R, but I?ve heard that in other languages there is something called ?self referencing?. Here?s what I?m trying to get an answer for: Suppose there is a function that takes as its input a value of a slot of an S4 object. The function itself is stored in another slot of the SAME S4 object. Is it then possible to have the function
2009 Aug 21
1
Function "nsl()" missing in package utils
Dear list, today I stumbled across the function ?nsl()? for the first time in order to perform a hostname lookup. According to the R Reference Index (Version 2.9.1, page 1522), the function should be part of the "utils" package. However, I cannot find it in the utils package of my installation(s). I've tried the R-versions 2.8.1, 2.9.0 and 2.9.1. I'd be very thankful if
2010 Aug 17
4
Problems building own package (Error: "package has been build before R-2.10.0")
Dear List, I’m doing my first baby steps towards developing own R Packages and ran into the following problem: R CMD check mypackage works fine (no errors, no warnings) R CMD build mypackage works fine (no errors, no warnings) R CMD INSTALL –library=”C:\R\R-2.11.1\library” “something\mypackage\mypackage_1.0.tar.gz” works fine (no errors, no warnings) However, when I try loading the
2010 Aug 17
4
Problems building own package (Error: "package has been build before R-2.10.0")
Dear List, I’m doing my first baby steps towards developing own R Packages and ran into the following problem: R CMD check mypackage works fine (no errors, no warnings) R CMD build mypackage works fine (no errors, no warnings) R CMD INSTALL –library=”C:\R\R-2.11.1\library” “something\mypackage\mypackage_1.0.tar.gz” works fine (no errors, no warnings) However, when I try loading the
2014 Nov 27
2
Feature request: mixing `...` (three dots) with other formal arguments in S4 methods
Hi Gabriel, and thanks for answering. I'm basically just trying to find a way to use the power of `...` in more complex scenarios and I'm well aware that this might not be the best approach ;-) Regarding your actual question: "Are you suggesting methods be dispatched based on the *contents* of ... [...]?" Yes, I guess currently I kind of do - but not on the argument *names*
2014 Dec 15
3
Significant memory leak when using XML on Windows
Thanks a lot for answering. Before I get into it, please note that everything below bears the big capture "Thanks for trying to help me at all". 1) Yeah, those examples - quite hard to satisfy everyone's needs ;-) While the one side complained that my past examples regarding this issue were not informative enough, others didn't like the more elaborated version (as seems to be
2014 Nov 28
1
Feature request: mixing `...` (three dots) with other formal arguments in S4 methods
Well, the benefit lies in the ability to pass along arguments via `...` to more than one recipient that use *identical argument names* and/or when these recipients are not necessarily located on the same calling stack layer. I'm *not* after a *general* change in the way arguments are dispatched/functions are called as I'm actually a big friend of keepings things quite explicit (thus
2013 Mar 20
1
S4 Reference Classes: undesired behavior when calling method '$field()'
Dear list, I came across a behavior that IMHO is somewhat undesired when calling '$field()': If the field name whose value you're trying to get is *not* a valid field of the Reference Class, then R doesn't stop there with an error, but scans through all enclosing environments/frames. The result is something similar to calling '|get(<objname>, inherits=TRUE)|'
2011 Jan 26
1
Error handling with frozen RCurl function calls + Identification of frozen R processes
Dear list, I'm tackling an empiric research problem that requires me to address a whole bunch of conceptual and/or technical details at the same time which cuts time short for all the nitty-gritty details of the "components" involved. Having said this, I'm lacking the time at the moment to deeply dive into parallel computing and HTTP requests via RCurl and I hope you can help me
2011 May 26
0
Reference Classes: strange behavior when trying to change class def in the same R session
Dear list, I'm getting some strange behavior with Reference Classes every once in a while and I can't really put my finger on the cause. It'd be great if someone using Reference Classes could check if he/she experiences similar problems: The thing is that when I alter the definition of a Reference Class in a running R session and source the respective file containing the class