# NOT RUN {
df <- createDataFrame(data.frame(x = c(-1, 0, 1)))
head(select(df, !column("x") > 0))
# }
# NOT RUN {
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"))))
# }
Run the code above in your browser using DataLab