You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have to write a complex function in Julia, an algorithm to fit a bayesian model, and then test it using datasets on R. I would like to "send feedbacks" to the user about the current state of the algorithm, for example by simply printing at which iteration we are. However I didn't find any way to receive (in real time, i.e. during the execution of that function, not all the strings at once only at the end of the run) the outputs of the print/show/display statements from the Julia code into.
So how can I solve this?
I read about using Rprintf, in other issues, but I did not undertand how to actually implement it and if it would work for this case.
For example I was testing something like this
functionmy_example(iters::Integer)
result =0.0for i in1:iters
print("iteration $i of $iters\r")
# do my heavy work
result +=rand() # for examplesleep(0.02)
endreturn result
end
But all those feedbacks about the count get displayed only at the end of the execution.
The text was updated successfully, but these errors were encountered:
I have to write a complex function in Julia, an algorithm to fit a bayesian model, and then test it using datasets on R. I would like to "send feedbacks" to the user about the current state of the algorithm, for example by simply printing at which iteration we are. However I didn't find any way to receive (in real time, i.e. during the execution of that function, not all the strings at once only at the end of the run) the outputs of the print/show/display statements from the Julia code into.
So how can I solve this?
I read about using Rprintf, in other issues, but I did not undertand how to actually implement it and if it would work for this case.
For example I was testing something like this
But all those feedbacks about the count get displayed only at the end of the execution.
The text was updated successfully, but these errors were encountered: