testlist <- list(i = -1542833499L, predy = structure(c(7.86218849558251e+96, 6.57684778288058e-265, NA, 3.25069102664982e-76, 2.06781639271292e+21, 1.14427186114757e+25, NA, Inf, 3.00408344002739e+142, 3.16528624357795e-77, 1.32626508360103e-207, Inf, Inf, 5.78660840138934e+63, 6.88269078692699e+77, 1.3432840385245e-172, 1.33133737932955e-21, 3.79325018983509e-87, 0.696194303913477, 1.66892398734842e+157, 4.91889456358059e+286, 1.06628380838757e-83, 4.6212243090561e+72, 5.01627224312403e+160, 3.82615067939364e+185, 7776801735130.33, 4.67109736560306e-254, 1.83861498972358e-260, 7.59331273783275e+75, 1.74098014077406e+38 ), .Dim = 6:5)) result <- do.call(bartBMA:::remove_curr_col,testlist) str(result)