I had this code like :--
using System.Text; using RDotNet; using RDotNet.NativeLibrary; using Stats; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { string rhome = System.Environment.GetEnvironmentVariable("R_HOME"); if (string.IsNullOrEmpty(rhome)) rhome = @"C:\Program Files (x86)\R\R-2.11.1"; System.Environment.SetEnvironmentVariable("R_HOME", rhome); System.Environment.SetEnvironmentVariable("PATH", System.Environment.GetEnvironmentVariable("PATH") + ";" + rhome + @"\bin\i386"); REngine.SetDllDirectory(@"C:\Program Files (x86)\R\R-2.11.1\bin"); using (REngine engine = REngine.CreateInstance("RDotNet")) { engine.Initialize(); REngine R = REngine.GetInstanceFromID("RDotNet"); engine.Evaluate("source('D:/n1.R')"); <<------- here i m calling a r script contain a function . Console.ReadKey(); } } } } My function looks like :--- fun<-function(x,y) { z=x*y return(z) } But i getting the error like :- Parse exception was unhanded & in the command line its showing like :---- Error in source :-<"D:/n1.R") : D:/n1.R:1:1: unexpected ')' 1: ) I am using R 2.11.1 and vs2010 . Does anybody have any solution for this ?? ,please help me out with this issue. PS :- ashis deb [[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.