Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save MJacobs1985/a10da5a764cdedfda4da249551fb892f to your computer and use it in GitHub Desktop.
Save MJacobs1985/a10da5a764cdedfda4da249551fb892f to your computer and use it in GitHub Desktop.
nums <- unlist(lapply(dataset, is.numeric))
datasetnums<-dataset[ , nums]
TSdist::EuclideanDistance(dataset$VCO2i, dataset$Hb)
diss <- TSdist::TSDatabaseDistances(datasetnums, distance="euclidean", diag=T, upper=T) %>%
as.matrix()
diss %>%
reshape::melt() %>%
ggplot2::ggplot()+
ggplot2::geom_tile(ggplot2::aes(x = X1, y = X2, fill = value))+
ggplot2::scale_fill_viridis_c()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment