Quantcast
Channel: R.NET
Viewing all articles
Browse latest Browse all 1634

New Post: Cant source another R script

$
0
0
This is odd. Your code looks fine, and the following works for me as expected.
            engine.Evaluate("source(file.path('f:/tmp/test.R'))");
            var a = engine.Evaluate("a").AsNumeric().ToArray();
While not a perfect match ('file' vs 'filename') it looks like the call to 'source' fails at:
            file <- file(filename, "r", encoding = encoding)
as of 2.15.0 (and probably for a long time) all arguments to the file function have default values, so the error message about a missing argument is very unexpected. Can you run in R actually?
file(description = "", open = "", blocking = TRUE,
     encoding = getOption("encoding"), raw = FALSE)

Viewing all articles
Browse latest Browse all 1634

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>