I don't have the Kendall package at my fingers, but it seems like you have some deeper trouble with R syntax if you are writing things like
MannKendall(1:27(data),data) when you know that MannKendall only takes one argument. Can you verify that your data object actually has a full set of data to it? (use some combination of length(),nrow(),dput(),head(),tail() etc) For a general tip, data() is a function to R so its not the best idea for an object name. Outside chance that might be what's causing your problem. Michael Weylandt On Fri, Sep 2, 2011 at 11:35 AM, ScottM <scott.mcgr...@abdn.ac.uk> wrote: > Hi there, > > I'm trying to apply the Mann Kendall test for trend analysis of a time > series. I have downloaded and installed the package Kendall and > subsequently loaded it into the software. > > My time series is a .txt file with 2 columns - column 1 is the year (1985 - > 2009) and column 2 is the corresponding entry variable. > > According to the R guidelines, the call should be: > > MannKendall(x) [whereby x is a data vector, usually a time series] > > As such, I've loaded in my file 'data.txt' and then called on: > > MannKendall(data), to which I get the following: > > Error in Kendall(1:length(x), x) : length(x)<3 > > What do I need to do to get beyond this highly annoying error? I've tried > MannKendall(1:27(data), data), but then keep getting this: > > Error in Kendall(1:length(x), x) : attempt to apply non-function > > Any help greatly received! > > S > > -- > View this message in context: > http://r.789695.n4.nabble.com/Mann-Kendall-Test-for-Trend-tp3786392p3786392.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.