Skip to content

Commit

Permalink
Merge pull request #194 from CSAFE-ISU/193-clusters-warning
Browse files Browse the repository at this point in the history
193 clusters warning
  • Loading branch information
stephaniereinders authored Oct 11, 2024
2 parents 94f142b + 29fb9a1 commit 7867ae4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# handwriter (development version)

## Minor improvements and fixes

* Fixed a bug in `get_clusters_batch()` so it no longer returns the error message, "Unable to get cluster assignments for one or more documents," if the file all_clusters.rds exists in the output directory.

# handwriter 3.2.0

## New features
Expand Down
2 changes: 1 addition & 1 deletion R/cluster_assignment.R
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ get_clusters_batch <- function(template, input_dir, output_dir, writer_indices,
# allow a warning to be given if a document without graphs is encountered and
# this message could be removed.
outfiles <- list.files(output_dir, pattern = ".rds", full.names = TRUE)
outfiles <- outfiles[which(outfiles != "all_clusters.rds")]
outfiles <- outfiles[which(basename(outfiles) != "all_clusters.rds")]
if (length(outfiles) != nrow(proclist)){
warning('Unable to get cluster assignments for one or more documents.')
}
Expand Down

0 comments on commit 7867ae4

Please sign in to comment.