Checking for identical columns in a data frame in R

后端 未结 3 1727
南方客
南方客 2020-12-30 23:47

Suppose you have a data frame called data with two identical columns:

A B
1 1
2 2
3 3
4 4

How can I check if these two columns are identica

3条回答
  •  北荒
    北荒 (楼主)
    2020-12-31 00:30

    You could use identical

    identical(DT[['A']],DT[['B']])
    

提交回复
热议问题