Rで複数行コメントアウトは “if(0){” と “}” で囲む

例えば、以下の3行のRのコードがあったとします。
x <- c(3, 5, 4)
y <- c(6, 7, 9)
t.test(x, y)

全部の前に、# を入れてもよいのですが、"if(0){" と “}" で囲むと、以下のようにコメントアウトできます。
if(0){
x <- c(3, 5, 4)
y <- c(6, 7, 9)
t.test(x, y)
}

“if(0){" と “}" で囲めば、その中身のコードは実行されません(事実上の複数行コメントアウト)。
ディスカッション
コメント一覧
まだ、コメントがありません