test.spear(.471, .2, 100)
# Should return:
# Estimate z p
# 0.471 3.0096 0.00262
test.spear(.341, 0, 100)
# Should return:
# Estimate t df p
# 0.341 3.591 98 0.00052
Run the code above in your browser using DataLab