Github user HyukjinKwon commented on a diff in the pull request:

    https://github.com/apache/spark/pull/23072#discussion_r239700846
  
    --- Diff: R/pkg/vignettes/sparkr-vignettes.Rmd ---
    @@ -968,6 +970,17 @@ predicted <- predict(model, df)
     head(predicted)
     ```
     
    +#### Power Iteration Clustering
    +
    +Power Iteration Clustering (PIC) is a scalable graph clustering algorithm. 
`spark.assignClusters` method runs the PIC algorithm and returns a cluster 
assignment for each input vertex.
    +
    +```{r}
    +df <- createDataFrame(list(list(0L, 1L, 1.0), list(0L, 2L, 1.0),
    +                      list(1L, 2L, 1.0), list(3L, 4L, 1.0),
    --- End diff --
    
    Yea, we do have for indentation rule. "Code Style Guide" at 
https://spark.apache.org/contributing.html -> 
https://google.github.io/styleguide/Rguide.xml. I know the code style is not 
perfectly documented but at least there are some examples. I think the correct 
indentation is:
    
    ```r
    df <- createDataFrame(list(list(0L, 1L, 1.0), list(0L, 2L, 1.0),
                               list(1L, 2L, 1.0), list(3L, 4L, 1.0),
                               list(4L, 0L, 0.1)),
                          schema = c("src", "dst", "weight"))
    ``` 


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to