I have a data frame like this :
1 NA 0.2 NA 1 2
2 NA 0.5 NA 1 6
3 NA 0.7 NA 1 4
4 NA 0.3 NA 1 4
I want to remove the columns that have same values across all the rows.i.e my data frame should look like this:
1 0.2 2
2 0.5 6
3 0.7 4
4 0.3 4
Is there an easiest way to do this?