Thanks so much for the rapid bug fix!! Unfortunately, instead of the dimnames error, I'm now receiving the following:
Error in `[.data.table`(mtpc.stats, , `:=`(tau.mtpc, mtpc.all[mtpc.stats, :
Supplied 3 items to be assigned to 1 items of column 'tau.mtpc'. If you wish to 'recycle' the RHS please use rep() to make this intent clear to readers of your code.
Here's the traceback:
3: `[.data.table`(mtpc.stats, , `:=`(tau.mtpc, mtpc.all[mtpc.stats,
.SD[S.mtpc == stat, threshold]]))
2: mtpc.stats[, `:=`(tau.mtpc, mtpc.all[mtpc.stats, .SD[S.mtpc ==
stat, threshold]])]
1: mtpc(g, thresholds, covars = covars[, 1:2], measure = y, contrasts = mtpcContrast,
con.type = "t", level = x, N = mtpcVars[.(x, y), N], perms = mtpcPerms[[x]],
alt = mtpcVars[.(x, y), alt])