testlist <- list(win = -633382934L, x = c(-1.3632834170728e+138, -2.38306587225985e+175, -1.68483168506311e+267, 4.03426182553643e-273, -5.76032283442874e+120, -7.47771150611884e+253, NA, -5.08892941861268e+131, -Inf, 4.45806264621428e-140, 2.019822308281e+43, -1.68483168506311e+267, -2.61030582509935e+136, 6.05307783710692e+196, -1.31036230405503e+26, -1.00007907213102e+302, Inf, -3.87024688028257e-282, 5.84068156769377e+143, 0)) result <- do.call(amt:::rolling_median,testlist) str(result)