[
https://issues.apache.org/jira/browse/SPARK-6813?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14594873#comment-14594873
]
Shivaram Venkataraman commented on SPARK-6813:
----------------------------------------------
In terms of fixing the style issues that come up, I just had one more
suggestion. For the curly brace warnings, I think we can remove the `{}` for
functions which are one liners. For example, right now we have a convention of
writing
{code}
out <- lapply(in, function(x) { x*x })
{code}
I think we can make this
{code}
out <- lapply(in, function(x) x * x)
{code}
For functions with more than one line of code we should make them multi-line
functions.
cc [~sunrui] [~davies]
> SparkR style guide
> ------------------
>
> Key: SPARK-6813
> URL: https://issues.apache.org/jira/browse/SPARK-6813
> Project: Spark
> Issue Type: New Feature
> Components: SparkR
> Reporter: Shivaram Venkataraman
>
> We should develop a SparkR style guide document based on the some of the
> guidelines we use and some of the best practices in R.
> Some examples of R style guide are:
> http://r-pkgs.had.co.nz/r.html#style
> http://google-styleguide.googlecode.com/svn/trunk/google-r-style.html
> A related issue is to work on a automatic style checking tool.
> https://github.com/jimhester/lintr seems promising
> We could have a R style guide based on the one from google [1], and adjust
> some of them with the conversation in Spark:
> 1. Line Length: maximum 100 characters
> 2. no limit on function name (API should be similar as in other languages)
> 3. Allow S4 objects/methods
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]