I have a dataframe emissions
that looks like this (example):
CEDS_Sector Ammonia Carbon Dioxide ...
1A1a_Public Electricity 2528 NA
1A1b_Pet_refining NA NA
1A1c_Coke-ovens 0.000 1467
...
CEDS_Sector
is a factor, and all other columns are numeric.
If there is an NA
or 0 entry, I want that cell to become blank. If there is a > 0 value, I want that cell to have an "X" in it, to look like this"
CEDS_Sector Ammonia Carbon Dioxide ...
1A1a_Public Electricity X
1A1b_Pet_refining
1A1c_Coke-ovens X
...