Displaying 20 results from an estimated 4000 matches similar to: "Referring to objects themselves"
2011 Apr 25
1
Help with objects
Hi all,
I would appreciate some help in understanding how to find out about objects.
For example, to the extent that I understand R it seems to treat everything
as an object even without declaring them as objects. Everything has
attributes, for example, which are like instance variables in objects. In
addition, there are S3 and S3 category objects. Is there a good
introductory description of how
2011 May 07
2
Convenience-at-the-expense-of-clarity (was: quantmod's addTA plotting functions)
Thanks, Writing plot(addTA()) worked fine.
I find myself with such mixed feelings about R. After finding that addTA
worked fine at the command line but not in a function, I puzzled for a long
time about what kind of virtual machine structure could possibly account for
that. I couldn't think of any.
It turns out that this isn't due to an R virtual machine structure. The
reason addTA adds
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 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 Mar 20
2
R as a non-functional language
I'm reading Torgo (2010) *Data Mining with
R*<http://www.liaad.up.pt/~ltorgo/DataMiningWithR/code.html>in
preparation for a class I'll be teaching next quarter. Here's an
example
that is very non-functional.
> pH <- c(4.5,7,7.3,8.2,6.3)
> names(pH) <- c('area1','area2','mud','dam','middle')
> pH
area1 area2 mud dam
2011 Apr 29
2
Still confused about classes
Hi,
I'm still confused about how to find out what methods are defined for a
given class. For example, I know that
> today <- Sys.Date()
will produce an object of type Date. But I'm not sure what I can do with
Date objects or how I can find out.
> ?Date
refers me to the Date documentation page. But it doesn't tell me how, for
example, to extract the current year from a
2011 May 08
3
Another quantmod question
I'm having troubles with the names of columns.
quantmod deal with stock quotes. I've created an array of the first 5
closing prices from Jan 2007. (Is there a problem that the name is the same
as the variable name? There shouldn't be.)
> close
close
2007-01-03 1416.60
2007-01-04 1418.34
2007-01-05 1409.71
2007-01-08 1412.84
2007-01-09 1412.11
When I try to
2013 Jun 05
3
Samba4 and NVSv4
Short story: cannot get Kerberized NFSv4 to work. I've googled a great
deal and cannot find where I have goofed (and there sure is a lot of
misleading and just plain incorrect information out there), so would
appreciate another pair of eyes. NFSv4 without Kerberos does work fine, as
does ID mapping. We're using NFSv4 in production with sec=sys, but I'm not
happy with that. My
2013 Jun 05
3
Samba4 and NVSv4
Short story: cannot get Kerberized NFSv4 to work. I've googled a great
deal and cannot find where I have goofed (and there sure is a lot of
misleading and just plain incorrect information out there), so would
appreciate another pair of eyes. NFSv4 without Kerberos does work fine, as
does ID mapping. We're using NFSv4 in production with sec=sys, but I'm not
happy with that. My
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 29
1
Ref Classes: bug with using '.self' within initialize methods?
Dear list,
I'm wondering if the following error I'm getting is a small bug in the
Reference Class paradigm or if it makes perfect sense.
When you write an explicit initialize method for a Ref Class, can you
then make use of '.self' WITHIN this initialize method just as you would
once an object of the class has actually been initialized?
Because it seems to me that you can not.
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',
2011 May 27
1
Reference Classes/S4 Classes: can method dispatch check superclasses BEFORE resorting to method for "ANY"?
Dear list,
is it possible that method dispatch checks for superclasses/virtual
classes before checking "ANY"?
I'd like to build a generic initialization method for all my Reference
Class (say "MyDataFrame") objects by having them inherit from class, say
"MyRefClassVirtual" (which would have to be a virtual S4 class; there
are no virtual Reference Classes,
2011 Mar 07
1
WG: Reference classes: error with missing arguments in method calls
Dear list,
a while ago I posted this at r-devel but got no answers. Hope it?s okay to
give it a shot again by cross-posting it here.
TIA for any comments,
Janko
Von: Janko Thyson [mailto:janko.thyson.rstuff at googlemail.com]
Gesendet: Montag, 21. Februar 2011 00:58
An: r-devel at r-project. org (r-devel at r-project.org)
Betreff: Reference classes: error with missing arguments in method calls
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 May 04
1
Reference Classes: replacing '.self' with an .Rda image of '.self' from within a method? (was replacing '.self' with an .Rda image of '.self' from within a method?)
Sorry guys,
but I chose a really stupid name before (no "reference classes").
Hope it's okay to re-post.
Cheers,
Janko
>>> ORIGINAL MESSAGE <<<
Dear list,
Is it possible to update or reassign '.self' with an image of '.self'
(e.g. a locally stored .Rda file) from within a method?
I know that this might sound akward, but here's the use
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?
2011 Jun 06
1
Reference Classes: shortcut like 'isS4' for Ref Classes?
Dear list,
is there a shortcut-function to check whether a class is a Reference
Class or not? There's something like this for S4 classes
('isS4(object)'), but I couldn't find anything regarding Ref Classes.
Currently, I'm doing it this way, which is a bit clumsy:
A <- setRefClass("A", fields=list(X="numeric"))
a <- A$new()
isRefClass <-
2011 Dec 07
1
Possible bug in 'new()' for Reference Classes
Dear list,
I think I stumbled across a little bug with respect to the standard
initialization routine for Reference Classes.
It seems that a field 'self' is treated as if it's name would be '.self'
(which we know is reserved for the self reference of the instantiated
object itself) and thus an error is thrown.
If the field value is assigned in an explicit call after the
2017 Feb 17
2
nouveau preventing shutdown after suspend-resume
Hello Ilia,
On 17 February 2017 at 11:14, Ilia Mirkin <imirkin at alum.mit.edu> wrote:
> On Fri, Feb 17, 2017 at 10:54 AM, João Paulo Rechi Vita
> <jprvita at gmail.com> wrote:
>> I'm happy to file
>> a bugzilla entry and provide any other needed information or help with
>> testing. Are nouveau bugs tracked on bugs.kernel.org or the fdo
>> bugzilla?