I am new to Obsidian and RStudio, and since I have stared a RStudio course I have been trying to save notes with the R code, but I can’t get what I need as shown within the screenshot. Is there a way “to code” in Obsidian as in RStudio?
Do note that Obsidian deals with .md files, and not .r files, so you can’t compile/run the .md files directly from Obsidian. There are extension allowing for these files to be shown within Obsidian, but then they won’t have the nice syntax coloring.
If you’re looking for a code editor to handle and run “R” code, then Obsidian is most likely not the thing for you. If you’re looking for a great note taking application, where you can document how you’re using “R” code in various settings, then Obsidian is more likely the thing to use.
The four backticks are just needed when you’re posting example markdown and/or queries here in the forum. For your notes, in most cases it’s enough with the triple backticks, and the language specifier, like r.
When you copy from the forum into your notes, you need to make sure to use the “Paste and match style”. Otherwise the formatting will look strange and it will try to collate it into one paragraph.