approxQuantile <- function(x, cols, probabilities, relativeError) {
sdf <- attr(x, "jc")
statFunctions <- call_method(sdf, "stat")
quantiles <- call_method(statFunctions, "approxQuantile",
as.list(cols), as.list(probabilities), relativeError)
if (length(cols) == 1) {
quantiles[[1]]
}
else {
quantiles
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.