I'm doing a for
in my script, but in the last line when I run models$i
, I needed that i
to be the value of my i
of for
, how would I do it?
for(i in x){
maxit <- as.integer(1000000)
algoritmo <- neuralnet(dados2016[,5] ~ dados2016[,4],
data <- dados2016, hidden=i ,threshold=1, stepmax=maxit)
teste <- compute(algoritmo, dados2017[,4])
precos$weight[] <- NA
precos$weight[] <- if(dados2017[,4] < teste$net.result[,1], 1, 0)
models$i <- bt.run.share(precos, clean.signal=T)
}