[R] retrieving variables values from a function

krzysztof.sakrejda at gmail.com krzysztof.sakrejda at gmail.com
Tue Jan 27 16:12:58 CET 2009


Assuming you _really_ want to do this check out '<<-' and closures... And remember that your code will probably make other people cry when they go to debug it. 

Krzysztof

Sent via BlackBerry by AT&T

-----Original Message-----
From: jim holtman <jholtman at gmail.com>

Date: Tue, 27 Jan 2009 09:43:17 
To: diego Diego<dhabbyc at gmail.com>
Cc: <r-help at r-project.org>
Subject: Re: [R] retrieving variables values from a function


Just have it as a return value and then assign it when you return.
You should have have "side effects" coming from your functions.  There
are ways of doing it, but it you think you have to, think about it
again.

On Tue, Jan 27, 2009 at 8:54 AM, diego Diego <dhabbyc at gmail.com> wrote:
> Hello experts!
>  Is there a way to send an internal variable from a function to the
> workspace????, besides the function output, of course
>
>
> Thanks!!
>
>
> D.
>
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



-- 
Jim Holtman
Cincinnati, OH
+1 513 646 9390

What is the problem that you are trying to solve?

______________________________________________
R-help at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


More information about the R-help mailing list