There is a bug with code execution when pressing Ctrl-Enter in Windows (and I'm guessing it is general to all of Rstudio).
Can you please update the code parsing so that it will look to the previous line to see if the current line is a continuation?
With the following code:
foo1(
a=1,
b=1) %>%
foo2(a=foo3(
b=bar))
If I press Ctrl-Enter on the first line (with foo1
), it executes the entire block correctly (giving an error that it can't find foo1
):
> foo1(
+ a=1,
+ b=1) %>%
+ foo2(a=foo3(
+ b=bar))
Error in foo1(a = 1, b = 1) : could not find function "foo1"
If I press Ctrl-Enter on the last line (with b=bar
), it does not accurately look back all the way to the foo1
line, it just looks back to the foo2
line:
> foo2(a=foo3(
+ b=bar))
Error in foo2(a = foo3(b = bar)) : could not find function "foo2"