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) 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"))) ```