Dataframes as arguments to functions?

F.Tusell (etptupaf@agesi.bs.ehu.es)
Wed, 28 Jan 1998 12:32:18 +0100


I would like to code a program in such a way dat a dataframe is worked
upon by a number of different functions. Something like,

M <- as.dataframe(xxxx)
function1(M)

where function1() in turn calls function2(M) and so on, up to a three
or four level deeps nesting. Now, in the invocation of function1(M),
the dataframe M is found correctly, but further nested calls (to
function2(M), etc.) do not seem to propagate the argument.

I have read the S-Plus manual, and I understand that this is not a
bug, but a design decision --as it should be. My question is: how can
I do what I want (basically, pass dataframes as in a FORTRAN
call-by-reference subroutine)? Is there any other way to go around?

Any help appreciated.

ft.

---------------------------------------------------------------------
Fernando TUSELL etptupaf@bs.ehu.es
Departamento de Econometria y Estadistica
Facultad de CC.EE. y Empresariales Tel. (94) 4797433
Avenida Lendakari Aguirre, 83 +34,4,4797433
E-48015 BILBAO (Spain) Fax: 4797554
---------------------------------------------------------------------