Skip to content

Commit 54fda24

Browse files
committed
df2 rows assigned incorrectly
if df2 is different from df, assigning writer based on number of rows of df causes an error. this patch fixes that, allowing M x N comparisons to work smoothly.
1 parent c3d86dc commit 54fda24

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

R/distances.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ get_distances <- function(df, distance_measures, df2 = NULL) {
9191
if (is.null(df2)) {
9292
df2 <- df
9393
} else if (!("writer" %in% colnames(df2))) {
94-
df2$writer <- paste0("df2_unknown", 1:nrow(df))
94+
df2$writer <- paste0("df2_unknown", 1:nrow(df2))
9595
}
9696

9797
for (method in distance_measures) {

0 commit comments

Comments
 (0)