It seems like the na.rm=T within the apply function in my variance calculation:
poolvarcheck=((7037*(apply(yes, 2, var, na.rm=T)))+(5394*(apply(no,2,var,na.rm=T))))/12431
is causing this warning message:
“In if (na.rm) “na.or.complete” else “everything” : the condition has length > 1 and only the first element will be used”
I’ve looked around and this seems to mostly apply to loops or if clauses, but I’d like to know 1) whether this is affecting my results and how, and 2) if there is a way to avoid the warning.
Try using
na.rm=TRUE, chances are that you have redefinedTand it is biting you. That’s why use ofT/Fis strongly discouraged (and a package using those will fail the check).