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]]
I guess by workspace you mean global environment. I believe this is generally considered a bad practice, but see ?assign and ?"<<-" baptiste On 27 Jan 2009, at 13:54, diego Diego 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._____________________________ Baptiste Augui? School of Physics University of Exeter Stocker Road, Exeter, Devon, EX4 4QL, UK Phone: +44 1392 264187 http://newton.ex.ac.uk/research/emag
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?