I do not like the automatic indentation of comments in
ESS (Emacs Speaks Statistics) mode, because it is so far to the right.
normalize <- function(values){
# comment
return(2* values / (max(values) - min(values)) )
}
Python uses also docstrings for comments. And I play around with it in R.
normalize <- function(values){
"comment
line 2 of comment"
return(2* values / (max(values) - min(values)) )
}
I am sure I could fix the ESS indentation of comments too, but I like the idea of multiline
comments. Are there any downsides with docstrings in GNU R?
Comments that begin with
##instead of#will be auto-indented in line with the current level of indentation.