Bug 380669

Summary: syntax error executing functions line by line
Product: [Applications] rkward Reporter: RKWard Team <rkward-devel>
Component: generalAssignee: RKWard Team <rkward-devel>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: All   
Latest Commit: Version Fixed In:

Description RKWard Team 2007-04-11 15:24:27 UTC
-- Originally posted by (AT sourceforge.net): b00l --

-- This ticket was imported from http://sourceforge.net/p/rkward/bugs/15 on 2017-05-30 15:26:34 +0100 --
Using the "execute-current-line"-button, R throws a syntax error for all functions spanning more than 3 lines. Maybe a problem parsing newlines?

Examples: 

working:
test &lt;- function\(\) \{
return\(rnorm\(100\)\)
\}


syntax-error:
test &lt;- function\(\) \{
x &lt;- rnorm\(100\)
return\(x\)
\}
Comment 1 Thomas Friedrichsmeier 2007-04-11 17:41:01 UTC
Logged In: YES 
user\_id=300591
Originator: NO

Yes, a problem with newlines. Those would be omitted in the command that actually gets run. Therefore, what gets actually sent to R in the example is:

test &lt;- function\(\) \{  x &lt;- rnorm\(100\)  return\(x\)  \}

which indeed is a syntax error.

Fixed in the development version. Too bad, 0.4.7 is already released with the bug.
Comment 2 Thomas Friedrichsmeier 2007-04-11 17:41:01 UTC
- **assigned_to**: nobody --> tfry
- **status**: open --> closed-fixed