--- Stephen Tucker [EMAIL PROTECTED] wrote:
Dear John,
Perhaps I am mistaken in what you are trying to
accomplish but it seems like
what is required is that you call lstfun() outside
of ukn(). [and remove the
call to lstfun() in ukn()].
nts - lstfun(myfile, aa, bb)
results - ukn(dd1,
, nts$cda) ###
modified how called.
- Original Message -
From: John Kane [EMAIL PROTECTED]
To: R R-help r-help@stat.math.ethz.ch
Sent: Thursday, June 28, 2007 12:03 PM
Subject: [R] Function call within a function.
I am trying to call a funtion within another
function
and I
PROTECTED]
[mailto:[EMAIL PROTECTED] On
Behalf Of John Kane
Sent: Thursday, June 28, 2007 12:04 PM
To: R R-help
Subject: [R] Function call within a function.
I am trying to call a funtion within another
function
and I clearly am misunderstanding what I should
do.
Below
-help@stat.math.ethz.ch
Sent: Thursday, June 28, 2007 12:03 PM
Subject: [R] Function call within a function.
I am trying to call a funtion within another
function
and I clearly am misunderstanding what I should
do.
Below is a simple example.
I know lstfun works on its own but I cannot
[SNIP]
This has been very helpful though I still do not
understand why one must call nts$cda using the
eval(parse()) command. Is it because nts is created
within the ukn environment?
You don't *have* to use the eval(parse()). This works just as
well: mysum - nts$cda.
However, it
I am trying to call a funtion within another function
and I clearly am misunderstanding what I should do.
Below is a simple example.
I know lstfun works on its own but I cannot seem to
figure out how to get it to work within ukn. Basically
I need to create the variable nts. I have probably
missed
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of John Kane
Sent: Thursday, June 28, 2007 12:04 PM
To: R R-help
Subject: [R] Function call within a function.
I am trying to call a funtion within another function
and I clearly am misunderstanding
Dear John,
Perhaps I am mistaken in what you are trying to accomplish but it seems like
what is required is that you call lstfun() outside of ukn(). [and remove the
call to lstfun() in ukn()].
nts - lstfun(myfile, aa, bb)
results - ukn(dd1, a, b, nts$cda)
Alternatively, you can eliminate the
HERE
mysum - eval(parse(text=nam1))
#mysum - nam1[,3]*5
return(mysum)
}
results - ukn(dd1, a, b, nts$cda) ### modified how called.
- Original Message -
From: John Kane [EMAIL PROTECTED]
To: R R-help r-help@stat.math.ethz.ch
Sent: Thursday, June 28, 2007 12:03 PM
Subject: [R] Function