Skip to content

Commit ed66c81

Browse files
cafreemanDavies Liu
authored andcommitted
Update subtract to work with generics.R
1 parent f3ba785 commit ed66c81

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

R/pkg/NAMESPACE

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,6 @@ exportMethods("columns",
122122
"show",
123123
"showDF",
124124
"sortDF",
125-
"subtract",
126125
"toJSON",
127126
"toRDD",
128127
"unionAll",

R/pkg/R/DataFrame.R

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1159,10 +1159,13 @@ setMethod("intersect",
11591159
#' df2 <- jsonFile(sqlCtx, path2)
11601160
#' subtractDF <- subtract(df, df2)
11611161
#' }
1162+
1163+
#' @rdname subtract
1164+
#' @export
11621165
setMethod("subtract",
1163-
signature(x = "DataFrame", y = "DataFrame"),
1164-
function(x, y) {
1165-
subtracted <- callJMethod(x@sdf, "except", y@sdf)
1166+
signature(x = "DataFrame", other = "DataFrame"),
1167+
function(x, other) {
1168+
subtracted <- callJMethod(x@sdf, "except", other@sdf)
11661169
dataFrame(subtracted)
11671170
})
11681171

0 commit comments

Comments
 (0)