Hi!!

I am trying to generate data with specific correlation using corgen method from the ecodist package. It does not seem to generate the data properly. I am listing the code below. Secondly, when I put the code given below all in one file and source it, it is unable to complete the task. But when I execute it one at a time it is able to complete it. Can someone point out any mistake that I may be making?
Thanks ../Murli


library(ecodist)
x<-1:100
y<-corgen(x=x, r=.8, epsilon=0.01, population=FALSE)$y
colnames(data)<-c("x", "y")
write.csv(data, file="artDataCorrPt8.csv")
rm(data)

y<-corgen(x=x, r=.3, epsilon=0.01, population=FALSE)$y
colnames(data)<-c("x", "y")
write.csv(data, file="artDataCorrPt3.csv")
rm(data)

y<-corgen(x=x, r=0, epsilon=0.01, population=FALSE)$y
colnames(data)<-c("x", "y")
write.csv(data, file="artDataCorr0.csv")
rm(data)

y<-corgen(x=x, r=-0.8, epsilon=0.01, population=FALSE)$y
colnames(data)<-c("x", "y")
write.csv(data, file="artDataCorrMinusPt8.csv")
rm(data)


y<-corgen(x=x, r=1, epsilon=0.01, population=FALSE)$y
colnames(data)<-c("x", "y")
write.csv(data, file="artDataCorr1.csv")
rm(data)

y<-corgen(x=x, r=-0.9, epsilon=0.01, population=FALSE)$y
colnames(data)<-c("x", "y")
write.csv(data, file="artDataCorrMinusPt9.csv")
rm(data)



	[[alternative HTML version deleted]]

