HI, Dear community,

I am building the following loop,

ww<-function(file) {
  lossw<-vector()
  for (x in seq(0.1, 0.9, by=0.1)) {
  cat('xweight ', x, '\n')

  lossw[i] <- cross.validation(file, x)$avg

                                   }
return(lossw)  }


MY question is how to index the lossw[i]?



 for (i in 1:9)
 for (x in seq(0.1, 0.9, by=0.1))



Thanks so much!

-- 
Sincerely,
Changbin
--

	[[alternative HTML version deleted]]

