In my zeppelin (0.7.3) livy2.sparkr interpreter, scripts that more than 1 line couldn't work.
Then I tried this in R:
> parse(text="hello<-function(name){\r\n sprintf(\"Hello %s\", name);}")
Error in parse(text = "hello<-function(name){\r\n sprintf(\"Hello %s\", name);}") : :1:23: unexpected input 1: hello<-function(name){ ^
> parse(text="hello<-function(name){\n sprintf(\"Hello %s\", name);}")
expression(hello<-function(name){ sprintf("Hello %s", name);}) >
Seems zeppelin interpreter mistreat the line ending to Windows style, and R doesn't support \r.
Anyone met this issue?