diff --git a/R/generate_themes.R b/R/generate_themes.R index d441279..bc91f31 100644 --- a/R/generate_themes.R +++ b/R/generate_themes.R @@ -92,7 +92,7 @@ generate_themes <- mds = avg_cluster_embeddings %>% tibble::column_to_rownames("Cluster") %>% as.matrix() %>% - cosine_dissimilarity(root = T) %>% + cosine_dissimilarity(root = TRUE) %>% smacof::mds(type = "ordinal") #Generate distinct categorical colors for plotting diff --git a/R/utils.R b/R/utils.R index 4acca7f..951dc72 100644 --- a/R/utils.R +++ b/R/utils.R @@ -16,7 +16,7 @@ cosine_dissimilarity <- function(mat, root = FALSE) { sim = sim %*% t(sim) if(root == T) { - D_sim = stats::as.dist(sqrt(1 - sim)) + D_sim = stats::as.dist(suppressWarnings(sqrt(1 - sim))) } else { D_sim = stats::as.dist(1 - sim) }