Write your function to a file and use the source() function to load it or put the entire function into a single String object and pass that to the engine.
There is no line continuation feature in R.NET.
engine.EagerEvaluate("{")
is not a valid command