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

    https://github.com/apache/spark/pull/16283#discussion_r92497054
  
    --- Diff: R/pkg/vignettes/sparkr-vignettes.Rmd ---
    @@ -834,6 +838,29 @@ model <- spark.logit(df, Species ~ ., regParam = 0.5)
     summary(model)
     ```
     
    +#### Kolmogorov-Smirnov Test
    +
    +`spark.kstest` runs a two-sided, one-sample [Kolmogorov-Smirnov (KS) 
test](https://en.wikipedia.org/wiki/Kolmogorov%E2%80%93Smirnov_test).
    +Given a `SparkDataFrame`, the test compares continuous data in a given 
column `testCol` with the theoretical distribution
    +specified by parameter `nullHypothesis`.
    +Users can call `summary` to get a summary of the test results.
    +
    +In the following example, we test whether the `longley` dataset's 
`Armed_Forces` column
    +follows a normal distribution.  We set the parameters of the normal 
distribution using
    +the mean and standard deviation of the sample.
    +
    +```{r, warning=FALSE}
    +df <- createDataFrame(longley)
    +afStats <- head(select(df, mean(df$Armed_Forces), sd(df$Armed_Forces)))
    +afMean <- afStats[1]
    +afStd <- afStats[2]
    +
    +test <- spark.kstest(df, "Armed_Forces", "norm", c(afMean,afStd))
    --- End diff --
    
    nit, space in `c(afMean, afStd)` for style


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to