You have a couple of major points of confusion that I'll address briefly and then direct you to appropriate reference material.
I) R is not compiled. It is an interpreted language. 2) R and Fortran are not equivalent. Something that is good code in one is not likely to be good code, or even valid code, in the other. 3) source() only tells R to execute a sequence of commands sequentially (with some printing options turned off) -- no more, no less. It's almost the same as running those commands directly at the interpreter. If you want to learn to use compiled routines within an R context, please look at http://cran.r-project.org/doc/manuals/R-exts.html, particularly chapter 5, and ? .Fortran Any further help will require you give, at an absolute minimum, OS and R version information and will likely require information about your fortran compiler (probably best to use R's provided ones -- either at http://cran.r-project.org/ (click through for your OS)) and which fortran you are using (they aren't all equally supported). Michael On Sat, Jan 21, 2012 at 4:12 AM, parvin sabeghi <[email protected]> wrote: > dear all, > I created a dll file from a fortran program. How I can recompile it in R? I > use "dyn.load(F:/myprogram.dll)" without any error but when I run > "source(F:/myprogram.r)" this error occurs: > "Error in file(file, "r", encoding = encoding) : > cannot open the connection > In addition: Warning message: > In file(file, "r", encoding = encoding) : > cannot open file 'F:/condlogic.r': No such file or directory" > > how should I recompile this dll file and if my process is true, How I can > create "myprogram.r" file? > thanks a lot for any help. > > [[alternative HTML version deleted]] > > ______________________________________________ > [email protected] 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. ______________________________________________ [email protected] 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.

