Skip to main content
3 of 3
Removed question from answer
PolyGeo
  • 65.4k
  • 29
  • 114
  • 345

When I run your code the only integer variable in the nc.shp on R side is CRESS_ID; and is intepreted as integer in QGIS as well.

All the other variables are "numeric" in R, which translates to Real in Qgis, in both cases being floating point (in line with expectations, with added consideration that the ESRI Shapefile follows Ashton-Tate dBase IV logic - which is positively ancient).

I am using 3.22.10-Białowieża

enter image description here

If you have numeric data on R side you wish to interpret as integer in QGIS it may help to run as.integer() on them before exporting the shapefile.

Jindra Lacko
  • 1.2k
  • 7
  • 12