[R-sig-Geo] Can't run mk.test for raster stack
Mandakh Nyamtseren 2
maaggi at yahoo.com
Fri Oct 14 13:55:25 CEST 2016
Dear all,I'm trying to use MannKendall test to get trend of 10 year aridity data. Can some one help me to correct this code.
>library(raster)
>library(trend)
>setwd("D:/ClimateData/MK_aridity")
>list <- list.files(pattern = "*.asc")
>RasterStack <- Stack(list)
>test <- calc(r, fun=function(x) {return(unlist(mk.test(x)))}, na.rm)
When I run I receive messege :
Error in .calcTest(x[1:5], fun, na.rm, forcefun, forceapply) :
cannot use this function
In addition: Warning messages:
1: In .HTMLsearch(query) : Unrecognized search field: title
2: In .HTMLsearch(query) : Unrecognized search field: keyword
3: In .HTMLsearch(query) : Unrecognized search field: alias
The raster has a portion of pixels with NA values.
Thank you in advance for your help.
Sincerely,
Ms. N.Mandakh
Division for Desertification Study
Institute of Geography and Geoecology Mongolian Academy of Sciences
Baruun Selbe-15
Ulaanbatar - 15170
Mongolia
Fax: 976-11-321862
Cellular: 976-99148380
E-mail: maaggi at yahoo.com, n.mandakh at gmail.com
[[alternative HTML version deleted]]
More information about the R-sig-Geo
mailing list