The original data file is located here: https://datasets.wri.org/dataset/globalpowerplantdatabase
Before loading the dataset into R, I deleted several columns I did not need in Excel. The only columns I used were country, country_long, name, capacity_mw, latitude, longitude, primary_fuel, other_fuel1, other_fuel2, and other_fuel3. Every other column was deleted by selecting all the data and pressing Delete on my keyboard (I have a Mac).
The gppd_idnr column was also deleted, however, there was then an empty column between the first three columns and the other columns. So, I copied all the data from the fourth column to the last and pasted it into the first cell of the third column which gets rid of the empty column.
This is what the original file should look like in Excel:
This is the original data file
This is what the file should look like modified:
As I mentioned, I deleted the unnecessary columns and after that I ended up with this file
I did add an extra column inside of R to get the continent the country was located in by using the countrycode library.