yihui/formatR — Issue #15: apparent difficulty with inline comments in argument list
Author: davharris
Created: 2011-12-30 00:18:20+00:00
State: open

Hi, this looks like a fantastic piece of software. I'm trying it out on a script that has a few functions with the following general structure:

```R
myfun <- function(
a, #a comment
b #another comment
){
a + b
}
```
I saved that minimal example to my desktop and ran the following line:

```R
tidy.source("~/Desktop/test.R")
```
Which results in the following error:

```R
Error in base::parse(text = block.text) :

:2:6: unexpected SPECIAL
1: myfun <- function (
2: a , %InLiNe_IdEnTiFiEr%
^
```

My best guess is that it doesn't like comments appearing among the function's arguments, but I don't know for sure that this is the issue or if it's something you'd be interested in fixing.

Hope this is useful feedback.

Thanks again,

Dave