sdf_showDF <- function (x, ...) {
sdf <- spark_dataframe(x)
sc <- spark_jobj(sdf)
.local <- function (x, numRows = 20, truncate = TRUE) {
s <- invoke(sc, "showString", ensure_scalar_integer(numRows), truncate)
cat(s)
}
.local(x, ...)
}
environment(sdf_showDF) <- asNamespace('sparklyr')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.