Using identical() in R with multiple vectors

前端 未结 6 608
没有蜡笔的小新
没有蜡笔的小新 2020-12-15 15:48

Suppose that I have five vectors:

A<-1:10
B<-1:10
C<-1:10
D<-1:10
E<-1:12

I could test two at a time using identical( ).

6条回答
  •  执念已碎
    2020-12-15 16:28

    Another option, just for fun:

    Vectorize(identical, 'x')(list(A, B, C, D, E), C)
    

提交回复
热议问题