Hi Uwe,
I mistook the arguments for the function of arrows. I understand now.
Thanks again.
2009/11/5 Uwe Ligges
>
>
> zhijie zhang wrote:
>
>> Hi Uwe,
>> It works. Why does the following argument generate different results?
>> with(data, arrows(x[-length(x)], y[-length(x)], x[-1], y[-1])
zhijie zhang wrote:
Hi Uwe,
It works. Why does the following argument generate different results?
with(data, arrows(x[-length(x)], y[-length(x)], x[-1], y[-1]))
#correct,multiple joins
In the former you select all elements of the vectors except the first or
last one, respectively.
In the
Hi Uwe,
It works. Why does the following argument generate different results?
with(data, arrows(x[-length(x)], y[-length(x)], x[-1], y[-1]))
#correct,multiple joins
with(data, arrows(x[1], y[1], x[length(x)], y[length(x)])) #wrong,seems to
be only one join
From the ?arrows, the second argument
zhijie zhang wrote:
Hi,
I have a data set with three variables,X Y and Time. X and Y are the
coordinates of points, i want to join these points according to the Time
sequence using arrows?
Demo Example data:
x<-c(1:6)
y<-c(1:6)
time<-c(6:1)
data<-cbind(x,y,time)
data
x y time
[1,] 1 1
Hi,
I have a data set with three variables,X Y and Time. X and Y are the
coordinates of points, i want to join these points according to the Time
sequence using arrows?
Demo Example data:
> x<-c(1:6)
> y<-c(1:6)
> time<-c(6:1)
> data<-cbind(x,y,time)
> data
x y time
[1,] 1 16
[2,] 2 2
5 matches
Mail list logo