# Create res1d
example(fdr1d)
# Compute fdr2d using the p0
res2d = fdr2d(xdat, grp, p0=p0(res1d))
# Show it
par(mfrow=c(2,1))
plot(res1d, main="fdr1d and averaged fdr2d")
lines(average.fdr(res2d), col="red")
plot(res2d, grid=TRUE, main="fdr2d is averaged across columns")
Run the code above in your browser using DataLab