Displaying 1 result from an estimated 1 matches for "data1_n".
Did you mean:
data1_1
2009 Nov 09
0
how to stop a loop in a sampling
...ix(data=c(1,1.22,1.32,1, 1.53, 2.34,1, 1.21, 1.37,1, 1.52,
2.35,2, 0.21, 3.33,2, 0.23, 3.35,3, 1.57, 1.31,3, 1.59,
1.33),nrow=8,ncol=3,byrow=TRUE)
data2<-data.frame(data2);names(data2)<-c("areaid","x1","y1")
id<-unique(data1$areaid)
for (n in id) {
data1_n<-data1[data1$areaid==n,]
data2_n<-data2[data2$areaid==n,]
leg1_n<-length(data1_n$areaid)
leg2_n<-length(data2_n$areaid)
if (leg1_n=1) merge(data1_n,data2_n,by.x="areaid",by.y="areaid") else
{
#leg1_n=1>=2
#leg1_1=2 and leg2_1=4 for areaid=1
set.see...