Description Usage Arguments Details Note Examples
Equality test that is safe for null values.
1 2 3 4 | x %<=>% value
## S4 method for signature 'Column'
x %<=>% value
|
x |
a Column |
value |
a value to compare |
Can be used, unlike standard equality operator, to perform null-safe joins.
Equivalent to Scala Column.<=>
and Column.eqNullSafe
.
%<=>% since 2.3.0
1 2 3 4 5 6 7 8 9 10 11 12 13 | ## Not run:
df1 <- createDataFrame(data.frame(
x = c(1, NA, 3, NA), y = c(2, 6, 3, NA)
))
head(select(df1, df1$x == df1$y, df1$x %<=>% df1$y))
df2 <- createDataFrame(data.frame(y = c(3, NA)))
count(join(df1, df2, df1$y == df2$y))
count(join(df1, df2, df1$y %<=>% df2$y))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.