ryentes / careless

Other
25 stars 8 forks source link

changes to even-odd #23

Closed franciscowilhelm closed 4 years ago

franciscowilhelm commented 4 years ago

Fixes #22

I made some changes to evenodd:

  1. Introduced error when calling even odd with just one factor. (Had to be an error rather than a warning because some later functions need the data to have length(factor) > 1)
  2. Introduced warning when variables indicated by factor argument do not match the input data (x).
  3. Use own warning for cases when NA arises because of 0 variance in even or odd vectors.
  4. refactored some of the code using apply.