# R Markdown

Drag and Drop R Markdown Block: On the right side of the canvas workspace, you will find the Add Block panel. Locate the R Markdown block and drag it onto your canvas. This block allows you to write and run R code. Code Entry: In the R Markdown block, you can write R code within designated code chunks. These chunks are encapsulated by three backticks followed by {r} at the start and three backticks at the end.

<figure><img src="/files/s7EiOi0HBcMiCBicLtzY" alt=""><figcaption><p>R Markdown</p></figcaption></figure>

To execute the R code, click the Run button at the top right of the block. The code output, which can include text, tables, and visualizations, will be displayed within the block. After running your code and generating the desired output, save the report by using publish report option in the bottom dropdown. This action updates the report with the latest changes and results.

<figure><img src="/files/ZQ3UdDs5jX3DAlF4DLHf" alt=""><figcaption><p>Publishing Report</p></figcaption></figure>

Post publishing use the Reports menu in the options within organization section to share or export your report.

<figure><img src="/files/gaaswQ7U3fjucW2Knn65" alt=""><figcaption><p>Report option</p></figcaption></figure>

By following these steps, you can effectively utilize Zerve’s R Markdown block to enhance your data analysis workflow, creating comprehensive reports that integrate narrative, code, and results seamlessly.

<figure><img src="/files/DCRZPO0Bed91GrqyJtBX" alt=""><figcaption><p>Published Report</p></figcaption></figure>

Upon clicking the link, the report can be viewed as shown in the below gif.

<figure><img src="/files/j4X7tQsODbJTLMfFV8zI" alt=""><figcaption><p>Published Report View</p></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.zerve.ai/guide/canvas-view/blocks-and-connections/block-types/r-markdown.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
