Christof,

You could use single linkage clustering to separate the dates into 
different groups if they are more than 14 days apart.  Below is a simple 
example, where x represents day.

x <- sort(sample(1:500, 100))
y <- rnorm(100)

cluster <- hclust(dist(x), method="single")
group <- cutree(cluster, h=14)
plot(x, y, col=group)
for(i in unique(group)) lines(x[group==i], y[group==i], col=i)

Jean



Christof Kluß <ckluss@email.uni-kiel.de> wrote on 10/26/2012 06:41:54 AM:
> 
> Hi
> 
> is there a automatic way that long distances between points are not
> connected. I have something like
> 
> plot(x,y,type="o",...)
> 
> atx <- seq(as.Date("2009-04-01"),as.Date("2011-04-01"),"month")
> 
> axis.Date(1, at=atx,labels=format(atx, "%b\n%Y"),  padj=0.5 )
> 
> but I do not want lines between points whose distance is greater than
> two weeks.
> 
> thx
> Christof

	[[alternative HTML version deleted]]


