The dataset has fillvalue of 1e30. While taking mean of the NetCDF files what code should i use?
na.rm=TRUE
or na.rm=FALSE( na.rm=FALSE)
list <- list.files("/filepath/", pattern = "*.nc", full.names = TRUE)
u2 <- stack(list)
r <- mean(u2, na.rm=TRUE)
I am getting values : -7.53555e+18, 1.263985e+18 (min, max)
using na.rm=TRUE
and -7.781048e+16, 3.923543e+15 (min, max)
while coding withr <- mean(u2)
.
na.rm=TRUE
does not give the correct result as the data are exaggerated. Another problem is that I am unable to plot the mean from first method (na.rm=FALSE) although the values seems to be quite correct. Before making analysis and plotting of the data what should be done?