Skip to content

Commit add4892

Browse files
committed
BUG: need interpret to work with signed vec
1 parent 34aafaa commit add4892

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

R/multiscaleSVDxpts.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5595,7 +5595,7 @@ interpret_simlr_vector2 <- function( simlrResult, simlrVariable, n2show = 5, sho
55955595
# If 'n2show' is NULL or greater than the length of t1vec, use the length of t1vec
55965596
n_items_to_show <- if (is.null(n2show)) length(t1vec) else min(c(n2show, length(t1vec)))
55975597
t1vec_sorted <- head(t1vec[order(abs(t1vec), decreasing = TRUE)], n_items_to_show)
5598-
if ( all(t1vec_sorted) < 0 ) t1vec_sorted=abs(t1vec_sorted)
5598+
if ( all(t1vec_sorted < 0 ) ) t1vec_sorted=abs(t1vec_sorted)
55995599
# Filter out non-significant values (absolute value > 0)
56005600
t1vec_filtered <- t1vec_sorted[abs(t1vec_sorted) > 0]
56015601
if ( return_dataframe ) {

0 commit comments

Comments
 (0)