Hello, why you don't use the last 3 arguments? >semivario=function(data,ids,times,resids){ > id=unique(data$ids) ... It seems "data" be a list. In that case the last 3 arguments are useless. Could you please send us a runable code example. That means some example data and your all neede functions (e.g. combinations, because there is the error you looking for.) > Error in combinations(length(data$times[data$ids == id[1]]), 2) : > bad value of n
Kind regards, Sebastian ______________________________________________ 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.