This is odd. Your code looks fine, and the following works for me as expected.
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)