For loop expression evaluation in DifferEq solver

Thanks Chris. I was able to do covert the code as you reccomended. I wanted to do some benchmarking on the speed so I manually entered everything into a Julia call/ Julia eval as shown below:

f ← JuliaCall::julia_eval("
function f(du,u,p,t)
du[1] = - 10.4545(u[1]^1) - 127000000(u[4]^1)(u[1]^1)
du[2] = - 1
3100000000*(u[2]^1)(u[4]^1)
du[3] = - 1
33000*(u[3]^1)(u[4]^1)
du[4] = 2
0.4545*(u[1]^1) - 13100000000(u[2]^1)(u[4]^1) - 133000*(u[3]^1)(u[4]^1) - 127000000*(u[4]^1)(u[1]^1) - 18500000*(u[4]^1)(u[5]^1) - 1390000000*(u[4]^1)(u[6]^1)
du[5] = - 1
8500000*(u[4]^1)(u[5]^1)
du[6] = - 1
390000000*(u[4]^1)*(u[6]^1)
end")

tspan ← list(0, 1E-1)
sol = diffeqr::ode.solve(‘f’,state,tspan,saveat=times, alg = “Rosenbrock23()”)

My question is now that I have this vector, what would you recommend for the best way to create the differential equations similar to above. Would you suggest the following?

Combine = c(" - 10.4545(u[1]^1) - 127000000(u[4]^1)(u[1]^1)", " - 13100000000*(u[2]^1)(u[4]^1)",
" - 1
33000*(u[3]^1)(u[4]^1)", "20.4545*(u[1]^1) - 13100000000(u[2]^1)(u[4]^1) - 133000*(u[3]^1)(u[4]^1) - 127000000*(u[4]^1)(u[1]^1) - 18500000*(u[4]^1)(u[5]^1) - 1390000000*(u[4]^1)(u[6]^1)",
" - 1
8500000*(u[4]^1)(u[5]^1)", " - 1390000000*(u[4]^1)*(u[6]^1)"

f ← JuliaCall::julia_eval("
function f(du,u,p,t)
for i in 1:6
du[i] = Combine[i]
end
end")

Thanks again for all your help and the work you have done with Julia!