Github user felixcheung commented on the pull request:
https://github.com/apache/spark/pull/9785#issuecomment-157631978
I fixed subset, lag, and filter. Not sure about the rest:
```
cov(x, y = NULL, use = "everything",
method = c("pearson", "kendall", "spearman"))
sample(x, size, replace = FALSE, prob = NULL)
table(...,
exclude = if (useNA == "no") c(NA, NaN),
useNA = c("no", "ifany", "always"),
dnn = list.names(...), deparse.level = 1)
```
For `cov` and `sample`, they are hard match for SparkR ones, and we can't
add param not in the generics as there is no `...`:
```
Error in rematchDefinition(definition, fdef, mnames, fnames, signature) :
methods can add arguments to the generic âsampleâ only if '...' is an
argument to the generic
```
For `table`, when added a setGenerics I can call base::table but then
calling `table(sqlContext, "table")` doesn't - I think it's because `table` is
S3
```
> find("table")
[1] "package:SparkR" "package:base"
> get("table")
standardGeneric for "table" defined from package "base"
function (..., exclude = if (useNA == "no") c(NA, NaN), useNA = c("no",
"ifany", "always"), dnn = list.names(...), deparse.level = 1)
standardGeneric("table")
<environment: 0x2526e28>
Methods may be defined for arguments: exclude, useNA, dnn, deparse.level
Use showMethods("table") for currently available ones.
> showMethods("table")
Function: table (package base)
...="ANY"
> table(sqlContext, "table")
Error in unique.default(x, nmax = nmax) :
unique() applies only to vectors
```
---
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]