Re: [R] Function call within a function.

2007-06-29 Thread John Kane
--- 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,

Re: [R] Function call within a function.

2007-06-29 Thread John Kane
, 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

Re: [R] Function call within a function.

2007-06-29 Thread John Kane
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

Re: [R] Function call within a function.

2007-06-29 Thread John Kane
-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

Re: [R] Function call within a function.

2007-06-29 Thread Jason Barnhart
[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

[R] Function call within a function.

2007-06-28 Thread John Kane
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

Re: [R] Function call within a function.

2007-06-28 Thread Nordlund, Dan (DSHS/RDA)
-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

Re: [R] Function call within a function.

2007-06-28 Thread Stephen Tucker
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

Re: [R] Function call within a function.

2007-06-28 Thread Jason Barnhart
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