Re: [R] assignment operator <- does not work in a function...

2011-10-31 Thread Bert Gunter
"assignment operator <- does not work in a function..." Of course not! Read the docs (e.g. "An Introduction to R", especially the part on writing functions) Also: ?"<<-" -- Bert On Mon, Oct 31, 2011 at 9:22 AM, Mehmet Suzen wrote: > Are you running the function with Rscript or R CMD? If yes,

Re: [R] assignment operator <- does not work in a function...

2011-10-31 Thread Mehmet Suzen
Are you running the function with Rscript or R CMD? If yes, try it interactively. Or, try to run them separate functions. >-Original Message- >From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] >On Behalf Of Levent TERLEMEZ >Sent: 31 October 2011 13:31 >To: r-help@r

Re: [R] assignment operator <- does not work in a function...

2011-10-31 Thread R. Michael Weylandt
It's a matter of environments: your function makes "veri" for purposes of the function but then throws it away when the function is done. If you want it to be accessible you need to assign it to the global environment with something like assign("veri", read.transactions("c:/RVerileri/BitirmeVeri.