for now I have not added a data sample as this does not seem to be of relevance...
I want to perform:
sum(df$y[df$x4 %in% c("1.A", "1.B", "1.C", "1.D") & x == "1990" & x2 ==
"Austria" & x1!="All greenhouse gases - (CO2 equivalent)"])
==sum(df$y[df$x4 in% c("1") & df$x == "1990" & df$x2 == "Austria" & x1!="All
greenhouse gases - (CO2 equivalent)"])
Expected outcome: "TRUE"
When performing
sum(df$y[df$x4 %in% c("1.A", "1.B", "1.C", "1.D") & x == "1990" & x2 ==
"Austria" & x1!="All greenhouse gases - (CO2 equivalent)"])
I get [1] 51347.52
When performing the second operation I get the same.
sum(df$y[df$x4 in% c("1") & df$x == "1990" & df$x2 == "Austria" & x1!="All
greenhouse gases - (CO2 equivalent)"])
So far so good.
However, when performing the operation stated at the beginning of this post, I get "FALSE", which is not true as tested by running both operation separately. How can this be?
The data source has five decimal places, but can this really be due to this?
Thanks in any case....