[R] Calling a function to store values

kparamas kparamas at asu.edu
Thu Mar 3 17:12:31 CET 2011


Hi,

I am calling a function with different arguments to read different files and
want the results to be stored in
different matrices.

Ex:
cData1 = NULL
cData2 = NULL

readData = function(cData, start, end)
{

....
   cData = //reads from the file
}

I am calling the functions using
readData(cData1,1,3)
readData(cData2,4,7)

But After running the code, cData1 and cData2 are not getting updated.
Is there a way in R to do this?

--
View this message in context: http://r.789695.n4.nabble.com/Calling-a-function-to-store-values-tp3333644p3333644.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list