diff options
author | Yanbo Liang <ybliang8@gmail.com> | 2016-01-26 19:29:47 -0800 |
---|---|---|
committer | Shivaram Venkataraman <shivaram@cs.berkeley.edu> | 2016-01-26 19:29:47 -0800 |
commit | e7f9199e709c46a6b5ad6b03c9ecf12cc19e3a41 (patch) | |
tree | c1721ec403a49b7aa6f7180616ac3d334a9c6cd6 /R/pkg/inst | |
parent | b72611f20a03c790b6fd341b6ffdb3b5437609ee (diff) | |
download | spark-e7f9199e709c46a6b5ad6b03c9ecf12cc19e3a41.tar.gz spark-e7f9199e709c46a6b5ad6b03c9ecf12cc19e3a41.tar.bz2 spark-e7f9199e709c46a6b5ad6b03c9ecf12cc19e3a41.zip |
[SPARK-12903][SPARKR] Add covar_samp and covar_pop for SparkR
Add ```covar_samp``` and ```covar_pop``` for SparkR.
Should we also provide ```cov``` alias for ```covar_samp```? There is ```cov``` implementation at stats.R which masks ```stats::cov``` already, but may bring to breaking API change.
cc sun-rui felixcheung shivaram
Author: Yanbo Liang <ybliang8@gmail.com>
Closes #10829 from yanboliang/spark-12903.
Diffstat (limited to 'R/pkg/inst')
-rw-r--r-- | R/pkg/inst/tests/testthat/test_sparkSQL.R | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/R/pkg/inst/tests/testthat/test_sparkSQL.R b/R/pkg/inst/tests/testthat/test_sparkSQL.R index b52a11fb1a..7b5713720d 100644 --- a/R/pkg/inst/tests/testthat/test_sparkSQL.R +++ b/R/pkg/inst/tests/testthat/test_sparkSQL.R @@ -996,6 +996,8 @@ test_that("column functions", { c14 <- cume_dist() + ntile(1) + corr(c, c1) c15 <- dense_rank() + percent_rank() + rank() + row_number() c16 <- is.nan(c) + isnan(c) + isNaN(c) + c17 <- cov(c, c1) + cov("c", "c1") + covar_samp(c, c1) + covar_samp("c", "c1") + c18 <- covar_pop(c, c1) + covar_pop("c", "c1") # Test if base::is.nan() is exposed expect_equal(is.nan(c("a", "b")), c(FALSE, FALSE)) |