The line:
X1<-runif(188)
initializes X1 with 188 values. If you’re indexing X1[189], there is an error.
Try this:
print (X1[189])
> NA
In order to correct it, just change your runif:
X1<-runif(500)
The line:
X1<-runif(188)
initializes X1 with 188 values. If you’re indexing X1[189], there is an error.
Try this:
print (X1[189])
> NA
In order to correct it, just change your runif:
X1<-runif(500)