Skip to content

Instantly share code, notes, and snippets.

@kashitan
Created April 7, 2015 00:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kashitan/e74d6df5354905aa3e0c to your computer and use it in GitHub Desktop.
Save kashitan/e74d6df5354905aa3e0c to your computer and use it in GitHub Desktop.
formatR確認用Rスクリプト
## comments are retained;
# a comment block will be reflowed if it contains long comments;
#' roxygen comments will not be wrapped in any case
1+1
if(TRUE){
x=1 # inline comments
}else{
x=2;print('Oh no... ask the right bracket to go away!')}
1*3 # one space before this comment will become two!
2+2+2 # only 'single quotes' are allowed in comments
lm(y~x1+x2, data=data.frame(y=rnorm(100),x1=rnorm(100),x2=rnorm(100))) ### a linear model
1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1 ## comments after a long line
## here is a long long long long long long long long long long long long long comment which will be wrapped
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment