Re: Forcing results from within a function

Prof Brian Ripley (ripley@stats.ox.ac.uk)
Wed, 21 Jan 1998 07:55:19 +0000 (GMT)


Shelby McIntyre wrote:
>
> In an S-Plus function, the variables created are local to the function.
> How can they be forced to disk instead? In one place I read that
> you can use the "<<_" assignment operator to do this. But it seems
> to be only for Unix environments (at least it doesn't work for me).
>

The operator you are seeking is "<<-", and it does work in 3.3 and 4.0
for Windows.

But, Bill Venables and I would advise the use of the assign() function
which gives more control, including allowing immediate assignment, which
is what you usually want if you are assigning from within a function.

-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595