This still gave the error:
Error in if (test$p.value < 0.05) { : missing value where TRUE/FALSE needed In addition: There were 50 or more warnings (use warnings() to see the first 50)
when run for Beta-d CAs