From 094112817db94680074c39a133228cf11a077ad9 Mon Sep 17 00:00:00 2001 From: uchicago-handena Date: Wed, 15 Oct 2025 16:42:14 -0500 Subject: [PATCH] Forced removeOutlierCorners result to be matrix --- R/removeOutlierCorners.R | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/R/removeOutlierCorners.R b/R/removeOutlierCorners.R index 22dab64..73d1f00 100644 --- a/R/removeOutlierCorners.R +++ b/R/removeOutlierCorners.R @@ -105,7 +105,7 @@ removeOutlierCorners <- function(int_corners, nx, ny){ if(plot) points(int_corners[remove, ], col='red', cex=1.1) - int_corners <- int_corners[!remove, ] + int_corners <- int_corners[!remove, , drop=FALSE] dist_score <- dist_score[!remove] } @@ -114,9 +114,9 @@ removeOutlierCorners <- function(int_corners, nx, ny){ rank_thresh <- sort(dist_score_rank)[nx*ny] # ONLY RETAIN ROWS AT OR BELOW THRESHOLD - corners_trim <- int_corners[dist_score_rank <= rank_thresh, ] + corners_trim <- int_corners[dist_score_rank <= rank_thresh, , drop=FALSE] if(plot) points(corners_trim, col='orange', cex=0.4) corners_trim -} \ No newline at end of file +}