RStudio is made up of four main windowpanes:
1. Script Editor/Source
2. Console
3. Global Environment/History pane
4. Files/Plots/Packages/Help/Viewer pane
Code can be written in either the Script Editor or the Console. Make it a best practice to edit and run codes through the Script Editor, as you can save codes to keep record of what you did, show others how codes were run, and repeat coding later if needed. Limit using the Console to executing code, viewing results, and identifying errors.