Nothing
#| label = "getLibs" library(tidyverse) library(broom) library(knitr)
#| label = "getDistMat" ## add commands here to make # DistMat
#| label = "{{DataName}}.mds" {{DataName}}.mds = DistMat |> cmdscale() colnames({{DataName}}.mds) = c("x", "y")
#| label = "{{DataName}}.kmeans" {{DataName}}.kmeans = kmeans({{DataName}}.mds , NClust) {{DataName}}.kmeans |> tidy() |> kable(caption="Cluster details fort he {{DataName}} data.")
#| label = "addClusters" {{DataName}}.mds = {{DataName}}.mds |> as_tibble() |> mutate(Labels = labels(DistMat), Cluster = as.factor({{DataName}}.kmeans$cluster))
#| label = "plot{{DataName}}.mds", #| fig.cap = "Multidimensional scaling of the {{DataName}} data." {{DataName}}.mds |>ggplot(aes(x=x, y=y, groups=Cluster)) + geom_point()
#| label = "getClusters" {{DataName}}.mds |> arrange(Cluster) |> kable(caption="Cluster memberships for the {{DataName}} data.")
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.