I have datasets in .nc format. I imported them in R as rasters but they appear as lateral inversions (see image below).
I tried changing the orientation and inversion with the codes below but none worked as the results are all laterally inverted. In ArcMap, one can use the mirror feature tool to correct the lateral inversion.
Is there a way to do something similar to mirroring features in R?
f <- list.files(path=".",
pattern='nc$', full.names=TRUE)
s <- stack(raster(f))
P <- t(flip(s, direction='x'))
P2 <- t(flip(s, direction='y'))
The resulting images for P and P2 are shown below.