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-project.org >Subject: [R] assignment operator <- does not work in a function... > >Dear Users, > >I have a little problem with assignment operator. It's working from >command prompt but does not work same as in the command prompt in the >function. Am I missing or forgetting something? The function is (tried >on both 2.13.1 and 2.13.2) as below using arules and arulseViz packages: > >>kuralfonk >function() >{ > require(arules) > require(arulesViz) > veri<- >read.transactions("c:/RVerileri/BitirmeVeri.csv",sep=";",col=1) #This >statement does not add "veri" object to working area > #itemFrequencyPlot(veri,type="absolute") > #bringToTop(-1) > summary(veri) #But this statement gives the right answer > itemFrequency(veri,type="absolute") #And this statement does >nothing, even the graph window does not open. >} > >Thanks for your tips and corrections, >Levent. > > [[alternative HTML version deleted]] > >______________________________________________ >R-help@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. LEGAL NOTICE This message is intended for the use o...{{dropped:10}} ______________________________________________ R-help@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.