I have created an SpatialPointsDataFrame in R with some data. Here is the outputs from R:
> class(Fotos)
[1] "SpatialPointsDataFrame"
attr(,"package")
[1] "sp"
> class(Fotos$Azimuth)
[1] "numeric"
> Fotos$Azimuth
[1] NA NA NA NA 0 NA NA NA NA NA
[11] 45 NA 90 NA NA NA 135 NA NA NA
[21] NA 180 NA NA NA NA NA NA 225 NA
[31] NA NA NA NA 270 315 NA NA NA NA
...
> class(Fotos$labelpos)
[1] "numeric"
> Fotos$labelpos
[1] NA NA NA NA 0 NA NA NA NA NA 0 NA 0 NA
[15] NA NA 0 NA NA NA NA 0 NA NA NA NA NA NA
[29] 0 NA NA NA NA NA 0 1 NA NA NA NA NA NA
[43] NA NA NA NA NA NA 0 NA NA NA NA NA 1 NA
...
It seems that both Attributes have the same data structure and class but when I export this SPDF to .gpkg some attributes replace NA by NULL and others replace NA by nothing. Like here:
How could I homogeneize those null/na/empty values in the .gpkg exported from R? I tryed something like this without fourtune:
Fotos@data[is.na(Fotos@data)] <- NA
EDIT: I tried to homogenize those NA with this:
# Homonegeneizar NAs
storage.mode(Fotos$OrdenSel) <- "integer"
storage.mode(Fotos$Plano) <- "integer"
storage.mode(Fotos$Cluster) <- "integer"
storage.mode(Fotos$labelpos) <- "integer"
storage.mode(Fotos$Azimuth) <- "integer"
But QGIS read those values as integers, but some has NULL and others empty...
Fotos
data, or a sample of it...