j143 commented on a change in pull request #1479:
URL: https://github.com/apache/systemds/pull/1479#discussion_r768601685
##########
File path: docs/site/builtins-reference.md
##########
@@ -1823,6 +1827,36 @@ scale=TRUE;
Y= scale(X,center,scale)
```
+## `setdiff`-Function
+
+The `setdiff`-function returns the values of X that are not in Y.
+
+### Usage
+
+```r
+setdiff(X, Y)
+```
+
+### Arguments
+
+| Name | Type | Default | Description |
+| :--- | :----- | -------- | :---------- |
+| X | Matrix[Double] | required | input vector|
+| Y | Matrix[Double] | required | input vector|
+
+### Returns
+
+| Type | Description |
+| :----- | :---------- |
+| Matrix[Double] | values of X that are not in Y.|
+
+### Example
+
+```r
+X = matrix("1 2 3 4", rows = 4, cols = 1)
+Y = matrix("2 3", rows = 2, cols = 1)
+R = setdiff(X = X, Y = Y)
Review comment:
Thanks for the examples, these are really helpful.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]