On 11-03-19 10:21 PM, Kenn Konstabel wrote:
On Sun, Mar 20, 2011 at 4:13 AM, Kenn Konstabellebats...@gmail.com wrote:
you can omit the list and do the following:
/.../
(but you don't really need this in this case as you can use balance
instead of this$balance)
P.S. using this would
On Sun, Mar 20, 2011 at 12:43 PM, Duncan Murdoch
murdoch.dun...@gmail.comwrote:
On 11-03-19 10:21 PM, Kenn Konstabel wrote:
On Sun, Mar 20, 2011 at 4:13 AM, Kenn Konstabellebats...@gmail.com
wrote:
you can omit the list and do the following:
/.../
(but you don't really need this in
Is it possible to refer to an object from within a method, as in *this *in
Java? I can't find anything about this in the documentation. Sorry if I
missed it.
Thanks.
*-- Russ Abbott*
*_*
*** Professor, Computer Science*
* California State
On Sat, Mar 19, 2011 at 6:34 PM, Russ Abbott russ.abb...@gmail.com wrote:
Is it possible to refer to an object from within a method, as in *this *in
Java? I can't find anything about this in the documentation. Sorry if I
missed it.
Assuming you are referring to S3, the first argument to a
Actually, I guess I'm not really talking about objects. I was looking
through the scoping demo. It uses this function.
open.account - function(total) {
+
+ list(
+deposit = function(amount) {
+if(amount = 0)
+stop(Deposits must be positive!\n)
+
, 19. März 2011 23:35
An: r-help@r-project.org
Betreff: [R] Referring to objects themselves
Is it possible to refer to an object from within a method, as in *this *in
Java? I can't find anything about this in the documentation. Sorry if I
missed it.
Thanks.
*-- Russ Abbott
On Sat, Mar 19, 2011 at 8:02 PM, Russ Abbott russ.abb...@gmail.com wrote:
Actually, I guess I'm not really talking about objects. I was looking
through the scoping demo. It uses this function.
open.account - function(total) {
+
+ list(
+ deposit = function(amount) {
+
You could (in addition to the other suggestions) try package proto (. refers
to self but see also the package's vignette)
account - proto(
deposit = function(., amount) {
if(amount = 0) stop(Deposits must be positive!\n)
.$total - .$total + amount
-Ursprüngliche Nachricht-
Von: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] Im
Auftrag von Russ Abbott
Gesendet: Samstag, 19. März 2011 23:35
An: r-help@r-project.org
Betreff: [R] Referring to objects themselves
Is it possible to refer to an object from within a method
: [R] Referring to objects themselves
Is it possible to refer to an object from within a method, as in *this
*in
Java? I can't find anything about this in the documentation. Sorry if I
missed it.
Thanks.
*-- Russ Abbott
that way.
HTH,
Janko
-Ursprüngliche Nachricht-
Von: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org
]
Im
Auftrag von Russ Abbott
Gesendet: Samstag, 19. März 2011 23:35
An: r-help@r-project.org
Betreff: [R] Referring to objects themselves
On Sun, Mar 20, 2011 at 4:13 AM, Kenn Konstabel lebats...@gmail.com wrote:
you can omit the list and do the following:
/.../
(but you don't really need this in this case as you can use balance
instead of this$balance)
P.S. using this would make some difference in one case:
instead of
Wonderful! Thanks. I think I've got it.
You can even put
this - environment() at the top
as long as
this
is returned at the end.
I gather that the environment keeps accumulating elements even though it is
assigned to 'this' at the beginning.
I had thought that $ worked only on lists,
On Sat, Mar 19, 2011 at 9:45 PM, Russ Abbott russ.abb...@gmail.com wrote:
Thanks for all the suggestions. I realize that this isn't the most important
thing in the world -- and as a newcomer to R I gather it's not the way most
people use R anyway.
But I tried to do what looked like the
-Ursprüngliche Nachricht-
Von: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org]
Im
Auftrag von Russ Abbott
Gesendet: Samstag, 19. März 2011 23:35
An: r-help@r-project.org
Betreff: [R] Referring to objects themselves
Is it possible to refer to an object from
Abbott
Gesendet: Samstag, 19. März 2011 23:35
An: r-help@r-project.org
Betreff: [R] Referring to objects themselves
Is it possible to refer to an object from within a method, as in *this
*in
Java? I can't find anything about this in the documentation. Sorry
if
I
missed
On Sun, Mar 20, 2011 at 12:10 AM, Russ Abbott russ.abb...@gmail.com wrote:
Actually I'm a big Haskell fan. So I think of functional programming very
positively. However, the environment() function doesn't seem to be treated
functionally. If I write
this - environment()
at the top of the
17 matches
Mail list logo