I used R to calculate the area of every land polygon of the world (Projection of the source shapefile: WGS84; CRS: EPGS: 4326).
To do that, I loaded the required packages ("sp" and "raster") and I simply used this line of code:
polygon_name$new_field <- area(polygon_name)/1000000
I divided by 1000000 to obtain the area in square kilometers.
However, repeating the same operation with QGIS 3.0.3 for some random polygons, I observed that the result is slightly different. For example, with R the surface of Antarctica is 13,924,270 kmq, whereas using QGIS is 13,761,440 kmq.
What could cause such difference?