We have two ways to run codes in R
- We can run the codes inside the Console. Our data will be stored in the Global Environment but no history is recorded. We won't be able to replicate the results once R is closed. We need to write the codes all over again. This method is not recommended if we want to replicate our save our codes
- Write the code in the script. We can write as many lines of codes as we want. To run the code, we simple select the rows we want to return. Finally, click on run. We can see the output in the Console. We can save our script and open it later. Our results won't we lost.