In the first screenshot you have created a .R document (for script), in the second an Rmarkdown document.
If you are writing code in an R script you don’t need the ‘’’ at the beginning and the background is white
1 Like