If you are using rcom from Excel, then you would send R the vector of numbers containing the values you were interested in and you would get the mean back. I suggest you look at the RExcel implementation and duplicate its capabilities. The rcom documentation includes examples in other languages than Excel. Followup should be on the rcom mailing list rco...@mailman.csd.univie.ac.at, which I am including by cc. You will need to sign up for that list at rcom.univie.ac.at While there also look at the discussions on the wiki there.
Rich On Wed, Jan 18, 2012 at 4:41 PM, Ajay Askoolum <aa2e...@yahoo.co.uk> wrote: > Thank you Michael, Sarah and Robin for the answers to my original question. > > Michael you asked:"But this is rarely a good idea....perhaps you could say > a little more > about your overall goal and we could direct you to a more "R"-ish > solution? " > > I realise eval (known as execute in one of my other languages) is not a > good idea. The background to my question is as follows: > > Using rcom & rscproxy, I can deploy R as a COM server inside a C# or VB > SOAP Web Service. Any methods that I write in the web service, will need > input (or arguments) of unknown length or type etc. > > > Say, (trivial example) I wanted R to give me the mean, median of > c(1,2,3,4,5), I can pass c(1,2,3,4,5) as the argument, have R eval it & > return the results. > > Do I make sense? > [[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<http://www.r-project.org/posting-guide.html> > and provide commented, minimal, self-contained, reproducible code. > [[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.