Open kevinsorochan opened 2 months ago
I suggest adding a conditional statement to read_aid_cnn(), such that if there are two columns the second is "confidence"
function(aid_file) {
aid_table <- read.table(aid_file, sep = " ")
if (ncol(aid_table) > 1) {
names(aid_table) <- c('roi', 'confidence')
} else { names(aid_table <- c('roi')
}
return(aid_table) }
Describe the bug the function read_aid_cnn is used within vpr_autoid_check where a "confidence" (i.e., roi probability score) is required. This results in error when processing autoid files without associated probability scores (e.g., threshold = NULL)
vpr_autoid_check(new_autoid = "new_autoid", original_autoid = auto_id_folder, cruise = "CAR2022299", dayhours = "d153.h20")
Error in names(aid_table) <- c("roi", "confidence") : 'names' attribute [2] must be the same length as the vector [1]