Question: what is the difference between console and script in r?
Answer: R studio is an IDE. You can write script files and also use lots of convenient features while coding using Rstudio. Of course, you can write and execute codes in R console as well but that`s not elegant form of coding. By the way, R studio can`t work if R is not installed in your system.