Displaying 1 result from an estimated 1 matches for "blap".
Did you mean:
blah
2012 May 23
2
storing output of a loop in a matrix
"blap.txt" is a numeric vector of length 64.
I am using the following code:
bd<-scan("blap.txt")
output<-matrix(0,64,10)
s<-sum(bd)
for (i in 10){
while (s>0)
{x1<-sample(bd,(length(bd)-1), replace=F)
s<-sum(x1)
bd<-x1
output[i]<-s
}
}
write.table(output, fil...