testlist <- list(ctree = structure(c(8.25246772782051e-29, 2.19753730419574e-110, 2.6885132775328e-209, 49484710.7641743), .Dim = c(4L, 1L)), neg = -1.12253487046367e+148, w = c(NA, -223982028L, 786878820L, 81319227L, 108589243L, -1885562416L, -1273322854L, -1626827578L, 469439502L, -1587395889L, 1225995341L, -351696655L, NA, 340123849L, 1602380799L, -1963407963L, -203836524L, 1022715013L)) result <- do.call(TransPhylo::probPTreeGivenTTree,testlist) str(result)