There is a post from Josiah Parry that shows how you can format R scripts as notebooks, saving it as a .r instead of .R and using # COMMAND --------- to specify a cell of a notebook. If you want to use the notebook functionality but develop outside of the Databricks UI.