From 450f6559f89543fed895c0f98da8db1381500f0e Mon Sep 17 00:00:00 2001 From: Bach Date: Tue, 29 Oct 2024 22:50:16 +0100 Subject: [PATCH 1/2] Updata processClouds The medoid column should be singular not plural medoidS otherwise nephovis would not be able to select the medoids automatically --- vignettes/processClouds.Rmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vignettes/processClouds.Rmd b/vignettes/processClouds.Rmd index bb7a75c..2efb472 100644 --- a/vignettes/processClouds.Rmd +++ b/vignettes/processClouds.Rmd @@ -169,7 +169,7 @@ distmtx <- read_tsv(file.path(output_dir, paste0(lemma, ".models.dist.tsv"))) %> pam_data <- pam(distmtx, k = k) medoid_data <- pam_data$clusinfo %>% as_tibble() %>% - mutate(medoids = pam_data$medoids, medoid_i = seq(k)) + mutate(medoid = pam_data$medoids, medoid_i = seq(k)) # medoid in singular or NephoVis would not be able to read it write_tsv(medoid_data, file.path(output_dir, paste0(lemma, ".medoids.tsv"))) ``` From e8f6920b6d7f5a99e422820dfe612e45937272dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Phan=20T=E1=BA=A5t=20B=C3=A1ch?= Date: Wed, 30 Oct 2024 14:04:13 +0100 Subject: [PATCH 2/2] Update HDBSCAN.Rmd to_write[lemma] should be to_write[models] --- vignettes/HDBSCAN.Rmd | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/vignettes/HDBSCAN.Rmd b/vignettes/HDBSCAN.Rmd index a056214..65b8a59 100644 --- a/vignettes/HDBSCAN.Rmd +++ b/vignettes/HDBSCAN.Rmd @@ -59,8 +59,9 @@ res <- map(setNames(models, models), # I would normally make one of these files for all my lemmas and store it within the github directory above the lemma subdirectories to_write <- list() -to_write[lemma] <- res -write_rds(to_write, file.path(output_dir, "hdbscan.rds")) +# to_write[lemma] <- res # This does not work as you need to assign models, not lemma +to_write[models] <- res +write_rds(to_write, file.path(output_dir, paste0(lemma, ".rds"))) ``` We can also use `purrr::map()` to create a named list gathering the full data for each lemma)