On 11.11.2011 18:48, Gyanendra Pokharel wrote:
Following is my code, can some one help on the error at the bottom?
mh<-function(iterations,alpha,beta){
+ data<-read.table("epidemic.txt",header = TRUE)
+ attach(data, warn.conflicts = F)
+ k<-97
+ d<- (sqrt((x-x[k])^2 + (y-y[k])^2))
+
Following is my code, can some one help on the error at the bottom?
> mh<-function(iterations,alpha,beta){
+ data<-read.table("epidemic.txt",header = TRUE)
+ attach(data, warn.conflicts = F)
+ k<-97
+ d <- (sqrt((x-x[k])^2 + (y-y[k])^2))
+ p <- 1-exp(-alpha*d^(-beta))
+ p.alpha<-1
2 matches
Mail list logo