It happens really often that number of records for different states is unequal. I assume that in that case the problematic if statement should also return FALSE. Currently, since vectors of different length are compared in this manner, shorter one is recycled, so it is theoretically possible that this expression will be evaluated to TRUE for vectors of different length.
Code in
calculate_p_value
generates enormous amount of warnings which state (pun intended):this happens from within this part of the code:
It happens really often that number of records for different states is unequal. I assume that in that case the problematic
if
statement should also returnFALSE
. Currently, since vectors of different length are compared in this manner, shorter one is recycled, so it is theoretically possible that this expression will be evaluated to TRUE for vectors of different length.