Hi Thomas,
THanks for the help in retrieving a server under shared use. In the VB code example: RServerManager.ServerPool.Item("MyR").Server.EvaluateNoReturn("plot(x)") Is this retrieving a server for shared use or is it doing something different? Regards, Wayne http://rcom.univie.ac.at/server/doc/RServerManager.html -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Thomas Baier Sent: 20 November 2008 22:21 To: rcom-l Subject: [Fwd: Re: [Rcom-l] Building R(D)Com Web Application experiences] Hi Wayne, [EMAIL PROTECTED] schrieb: > Hi Thomas & fellow R(D)Com users, > > Thanks for the excellent suggestion of using RserverManager. This would seem > to be exactly what I need! > I have managed to get an example in VBA working (See VBA code at bottom of > email). > > However, when I try to run a corresponding example using .NET with C# I run > into difficulty. > I can add a IStatConnector-objects to RserverManager with no problems but I > can't seem to retrieve it back again! > In VBA the RServerManager has a method called "Item" which I can pass in a > string to retrieve my IStatConnector session! > The methods, classes, constructors for the .NET example are quite different. > > Here is the C# code I used to set up an R session and store the > IStatConnector called "RLink" into the RServermanager. > Does anyone know how to get it back? i.e. can anyone translate the VBCode > > Call RServerManager.ServerPool.Item("MyR").Server.EvaluateNoReturn("plot(x)") > > to C#? The following piece of code retrieves a server called "R" for shared use and produces a plot: RServerManager.ServerPool lServerManager = new RServerManager.ServerPool(); RServerManager.ServerItem lItem = lServerManager.GetServerShared("R"); lItem.Server.EvaluateNoReturn("plot(sin(1:100))"); I hope this helps, Thomas _______________________________________________ Rcom-l mailing list Rcom-l@mailman.csd.univie.ac.at http://mailman.csd.univie.ac.at/mailman/listinfo/rcom-l More information (including a Wiki) at http://rcom.univie.ac.at _______________________________________________ Rcom-l mailing list Rcom-l@mailman.csd.univie.ac.at http://mailman.csd.univie.ac.at/mailman/listinfo/rcom-l More information (including a Wiki) at http://rcom.univie.ac.at