How do I run code in a note?

Set a code block to Python · runnable or R · runnable, then click Run cell.

Checked against Terra 0.1.0
  1. Add a code block: type /code and choose Code block.
  2. In Edit mode, click the language label at the block's top right. It reads Plain at first. Choose Python · runnable or R · runnable.
  3. Write your code and click Run cell. The output appears under the code.

Shortcut: none

Good to know

  • Terra runs code with the Python or R on your Mac. Python needs ipykernel, and R needs IRkernel.
  • Stop cell, Restart kernel and Clear output sit beside Run cell.
  • Code in a note that came from outside your library waits until you click Enable execution. That lasts until you quit.
  • After a relaunch, old output is marked stale until you run the cell again.