Thanks for the answers: I have tried all suggestions: Random Number seeds, setting up completely new environment, making sure libraries are load in the same order. But I still get different results in some calculations, others are the same.
I have for example stored the .Rmd program, load R anew, setup new project, changing working directory. Loaded the Rmd program and run it copying the code chunks to the console. This way I ensure that it is also a new environment in the console. But event then I get different results. It mostly happens with the train( function from the caret package. Is there a bug somewhere? Or maybe I have to make sure that I have installed R studio and R in the correct versions and sequence. Maybe it has to do with my Mac OS version too. I use MacOS High Sierra.
By the way I do not know what you mean with something "trivial" eg. Profile.
Thanks and regards
start a new project in R in a different directory