Nothing
#' @importFrom stats na.pass
#' @export
#'
stats::na.pass
#' @importFrom clue cl_predict
#' @export
#'
predict.kmeans <-
function(object,
newdata,
#na.action = na.pass,
...)
{
if (missing(newdata) || is.null(newdata)) return(object$cluster)
x <- clue::cl_predict(object, newdata, type = "class_ids")
as.integer(x)
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.