if (FALSE) {
library(dplyr)
sc <- spark_connect(master = "local")
iris_tbl <- sdf_copy_to(sc, iris, name = "iris_tbl", overwrite = TRUE)
iris_tbl %>%
ft_bucketizer(
input_col = "Sepal_Length",
output_col = "Sepal_Length_bucket",
splits = c(0, 4.5, 5, 8)
) %>%
select(Sepal_Length, Sepal_Length_bucket, Species)
}
Run the code above in your browser using DataLab