Multiline Comment Workarounds?

后端 未结 10 1115
轮回少年
轮回少年 2020-11-30 18:36

I (sort of) already know the answer to this question. But I figured it is one that gets asked so frequently on the R Users list, that there should be one solid good answer.

10条回答
  •  南方客
    南方客 (楼主)
    2020-11-30 19:01

    This does come up on the mailing list fairly regularly, see for example this recent thread on r-help. The consensus answer usually is the one shown above: that given that the language has no direct support, you have to either

    • work with an editor that has region-to-comment commands, and most advanced R editors do
    • use the if (FALSE) constructs suggested earlier but note that it still requires complete parsing and must hence be syntactically correct

提交回复
热议问题