Skip to content

Join points with arrows based a TIME variable

5 messages · Uwe Ligges, zhijie zhang

#
zhijie zhang wrote:
data <- data.frame(data[order(data[,"time"]),])
with(data, plot(y ~ x))
with(data, arrows(x[-length(x)], y[-length(x)], x[-1], y[-1]))


Uwe Ligges
#
zhijie zhang wrote:
In the former you select all elements of the vectors except the first or 
last one, respectively.

In the next call you select just one arguemnt of each vector, namely the 
first or last one.

Uwe Ligges