A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://spark.apache.org/docs/latest/api/R/reference/not.html below:

! — not • SparkR

Inversion of boolean expression.

Inversion of boolean expression.

Usage
not(x)

# S4 method for class 'Column'
!x

# S4 method for class 'Column'
not(x)
Arguments
x

Column to compute on

Details

not and ! cannot be applied directly to numerical column. To achieve R-like truthiness column has to be casted to BooleanType.

Note

! since 2.3.0

not since 2.3.0

Examples
if (FALSE) { # \dontrun{
df <- createDataFrame(data.frame(x = c(-1, 0, 1)))

head(select(df, !column("x") > 0))
} # }
if (FALSE) { # \dontrun{
df <- createDataFrame(data.frame(
  is_true = c(TRUE, FALSE, NA),
  flag = c(1, 0,  1)
))

head(select(df, not(df$is_true)))

# Explicit cast is required when working with numeric column
head(select(df, not(cast(df$flag, "boolean"))))
} # }

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4