5
I have two dataframes:
atualizada PIMPF_Br_A_1_sa PIMPF_Br_A_2_sa
1995-01-01 74.35501 35.59109
1995-02-01 74.06131 35.43400
1995-03-01 74.06131 35.93259
and:
atualizada PIMPF_Br_A_1_sa PIMPF_Br_A_2_sa PIMPF_Br_A_3_sa
1995-01-01 74.35501 35.59109 79.39399
1995-02-01 74.06131 35.43400 79.29079
1995-03-01 74.06131 35.93259 79.22728
I’m using the function identical to check if the two are equal and would like to return FALSE, return the column that is different between the two dataframes.
The code I’m using:
comparar <- identical(df1, df2)
if (comparar == TRUE){
print("Os dados são iguais")
} else {
print("Os dados não são iguais")
}