sparklyr - error for package "rsparkling": could not find function "as_h2o_frame" and cannot load any function from the package

Viewed 91

I am using R 4.1.1, and when I wanted to use rsparkling package, I encountered an error saying :

Error in as_h2o_frame(sc, partitions$training, strict_version_check = FALSE) : 
  could not find function "as_h2o_frame"

It seems I cannot load any function from rsparkling.

> ls("package:rsparkling")
character(0)
> getAnywhere(as_h2o_frame)
no object named ‘as_h2o_frame’ was found

A minimal reproducible example can be (It's copied from here):

install.packages("rsparkling")
library(rsparkling)
library(sparklyr)
library(h2o)
library(dplyr)

sc <- spark_connect("local")

mtcars_tbl <- copy_to(sc, mtcars, "mtcars")
partitions <- mtcars_tbl %>%
  filter(hp >= 100) %>%
  mutate(cyl8 = cyl == 8) %>%
  sdf_partition(training = 0.5, test = 0.5, seed = 1099)
training <- as_h2o_frame(sc, partitions$training, strict_version_check = FALSE)
test <- as_h2o_frame(sc, partitions$test, strict_version_check = FALSE)
0 Answers
Related