[R] Mann-Kendall test for many independent columns data set at a time
Desta Yoseph
desta_yo at yahoo.com
Tue Mar 31 01:09:12 CEST 2015
I am analyzing trend test using Mann-kendall monotonic trendtest for 10,368 independent grid cell, each grid has 34 years dataset. I supposed to find Kendall “tau” for each gridcell (each grid has 34 years data). The data is arranged in column wise (Iattached part of the grid dataset as a sample).
To find Kendall tau, I wrote R script as:
desta<-read.csv("rainfall.csv",header=T, sep=",")
require(Kendall)
MK<-function(y) {
nc<-ncol(y)
MannKendalltau<-numeric(nc)
for(i in 2:nc){
MannKendalltau[i]<-MannKendall(y[,i])
}
MannKendalltau
}
MK(desta)
The result displayed both “tau” and “2-sided pvalue”. But, I wantonly “tau” value that is printed in organized way. Anyone can tell me how can Iget orderly printed “tau” value for allgrid cells at a time.
Thank you for your help in advance,Desta WodeboTU-DresdenGermany
More information about the R-help
mailing list