Here is some documentation http://artax.karlin.mff.cuni.cz/r-help/library/fume/html/mkTrend.html http://artax.karlin.mff.cuni.cz/r-help/library/fume/html/00Index.html
Here is the code, you'll have to compile it from source. I was able to get it to work on my machine. http://cran.r-project.org/src/contrib/Archive/fume/
If it's still not working try and put some more information on your version of R, OS, and what the error message is.
Well, it depends on what modification of the MK test you are interested in. In the 'fume' package (mkTrend function in particualr), there was a modification based on the equivalent sample size according to Hamed and Rao (1998). This package, however, seems to be no longer available on CRAN (currently it is in archive). If you did not mind what modification should be preferred, I would recommend you the 'zyp' package which contains several functions performing so-called (trend-free) pre-whitening modification of the MK test (see Yue et al. 2002). Be aware that these modifications deal only with short-term persistence in a series. Particularly, only AR(1) processes are considered that are quite frequent in hydrology and/or climatology. Note that another challenge connected with the MK test is the cross-correlation (spatial correlation). For more information see, for instance, the following references:
Hamed, K. H. & Rao, A. R. (1998) A modified Mann-Kendall trend test for autocorrelated data. Journal of Hydrology 204(1-4), 182–196. doi:10.1016/S0022-1694(97)00125-X
Rivard, C. & Vigneault, H. (2009) Trend detection in hydrological series: When series are negatively correlated. Hydrological Processes 23(19), 2737–2743. doi:10.1002/hyp.7370
Yue, S., Pilon, P., Phinney, B. & Cavadias, G. (2002) The influence of autocorrelation on the ability to detect trend in hydrological series. Hydrological Processes 16(9), 1807–1829. doi:10.1002/hyp.1095
Yue, S. & Wang, C. Y. (2002) Regional streamflow trend detection with consideration of both temporal and spatial correlation. International Journal of Climatology 22(8), 933–946. doi:10.1002/joc.781
Yue, S. & Wang, C. (2004) The Mann-Kendall test modified by effective sample size to detect trend in serially correlated hydrological series. Water Resources Management 18(3), 201–218. doi:10.1023/B:WARM.0000043140.61082.60
And of course, you can write some own short script. For instance, the Bayley-Hammersley-Matalas-Langbein-Lettenmaier equivalent sample size method described in Yue and Wang (2004) (see the last entry in bibliography given in my previous answer) is very easy to implement. However, this approach is intended to address short-term persistence only.
As R is rapidly developed, I just discovered a new package called 'HKprocess' that incorporates a function devoted to long-term persistence according to Hamed (2008) written by Hristos Tyralis.
Here are some additional references:
Hamed, K.H., 2008. Trend detection in hydrologic data: the Mann–Kendall trend test under the scaling hypothesis. Journal of Hydrology 349, 350–363. doi:10.1016/j.jhydrol.2007.11.009
Tyralis, H., Koutsoyiannis, D., 2011. Simultaneous estimation of the parameters of the Hurst–Kolmogorov stochastic process. Stochastic Environmental Research and Risk Assessment 25, 21–33. doi:10.1007/s00477-010-0408-x
I extracted modified Mann Kendall test function (which called mkTrend) from FUME package. you can manually call this function.
Usage
mkTrend(x, ci = 0.95)
where,
x = time series data;
ci = Confidence interval of the statistical test. Default to 0.95
Output
Z = The original (non corrected) Mann-Kendall test Z statistic
p.value = The original (non corrected) Mann-Kendall test p-value
Zc = The new Z statistic after applying the correction
Corrected p.value = Corrected p-value after accounting for serial autocorrelation
tau= Mann-Kendall's tau statistic
N/n*s = Value of the correction factor, representing the quotient of the number of samples N divided by the effective sample size (n*s)
Sen slope = The slope of the (linear) trend according to Sen test
If you are familiar with Matlab, you can use "Mann-Kendall Modified test" matlab function which is available in http://www.mathworks.com/matlabcentral/fileexchange/25533-mann-kendall-modified-test .
But, this function has a bug, this was mansioned in comment. I fixed this function.
I attach both R and Matlab function with this comment. You can try those function.
Though it is considerably old post, I am posting the link to R- code to calculate Modified-Mann Kendall test using variance correction approach suggested by Hamed and Rao (1998) and Yue and Wang (2004). Also find the code for Spearman's Rank Correlation test in this package.