BTW, I did not touch unmask.source, instead I asked deparse.tidy to paste the characters together with \n first, then unmask.source can deal with this string correctly, even when inline comments were pushed to the next line. Thus I also modified the width to 0.75*getOption('width') since we do not need to leave that wide space for the code. I tested with a few cases, and it seems to work well.
BTW, I did not touch
unmask.source
, instead I askeddeparse.tidy
to paste the characters together with\n
first, thenunmask.source
can deal with this string correctly, even when inline comments were pushed to the next line. Thus I also modified the width to0.75*getOption('width')
since we do not need to leave that wide space for the code. I tested with a few cases, and it seems to work well.formatR 0.1-8: https://github.com/downloads/yihui/formatR/formatR_0.1-8.tar.gz