check whether all elements of a list are in equal in R

前端 未结 5 617
挽巷
挽巷 2021-01-02 09:34

I have a list of several vectors. I would like to check whether all vectors in the list are equal. There\'s identical which only works for pairwise comparison.

5条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-02 10:22

    PUtting in my self-promoting suggestion for cgwtools::approxeq which essentially does what all.equal does but returns a vector of logical values indicating equality or not.

    So: depends whether you want exact equality or floating-point-representational equality.

提交回复
热议问题