What is the difference between mk.test and MannKendall function in R I have daily meteorological data for 30 years and I want to apply the Mann-Kendall test to check the trend.
Firstly, I would like to ask if I should use yearly or daily data because I get different results each time.
Secondly, which function should I use between mk.test (library: trend) and MannKendall(library: Kendall) and how interpret them?
For instance, using daily data, with mk.test I get:
Mann-Kendall trend test
data:  data
z = -96.105, n = 12783, p-value < 2.2e-16
alternative hypothesis: true S is not equal to 0
sample estimates:
            S          varS           tau 
-4.630017e+07  2.320991e+11 -5.690336e-01 

and with MannKendall I get:
tau = -0.569, 2-sided pvalue =< 2.22e-16


For the software question, it looks like the results of the two functions are the same.
My understanding is that the Mann-Kendall test of trend doesn't take into account auto-correlation, so it is usually used in cases where auto-correlation is not expected to play a large part in the data.  Daily observations of meteorological data are likely to be auto-correlated.  Depending on what data you are looking at, monthly or yearly values may be appropriate.
Also note that there is a seasonal Mann-Kendall test which accounts for seasonal trends in the data.  This may be appropriate for meteorological data on a monthly scale.
You may also want to investigate ARIMA models, that can take into account auto-correlation.
