Skip to content

Commit

Permalink
Fix potential issue with multiple name matches
Browse files Browse the repository at this point in the history
  • Loading branch information
katelynqueen98 committed Dec 15, 2023
1 parent 6c5fcb5 commit 627a862
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/superPartition.R
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ super_partition <- function(full_data,
# add data to master partition mapping key
name <- master_cluster$col_name[which(master_cluster$cluster == unique(master_cluster$cluster)[i])]
part_master$mapping_key <- rbind(part_master$mapping_key,
c(name, name, list(1), grep(name, colnames(full_data)), i))
c(name, name, list(1), colnames(full_data)[which(colnames(full_data == name))], i))

# fix reduced_data column name
colnames(part_master$reduced_data)[length(colnames(part_master$reduced_data))] <- name
Expand Down

0 comments on commit 627a862

Please sign in to comment.