Skip to content

Commenting out multiple lines in R

October 23, 2012

The ‘best‘ way to comment out multiple lines in R is,


if(FALSE){
  print('this won't print')
  print('neither will this, and the following model won't be fitted')
  x <- runif(10)
  y <- runif(10)
  lm(y~x)
}
Advertisements
No comments yet

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: