# 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="https://1018070783-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIQKNeqjEeOp9UwUcB9R9%2Fuploads%2FLPgJzmRtQlgpumkTo2tM%2FR%20markdown%20step%201.png?alt=media&#x26;token=b2c0ecf4-0b25-4948-9ba7-35da038ec554" 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="https://1018070783-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIQKNeqjEeOp9UwUcB9R9%2Fuploads%2FQ0zmK4TjQlYg0AcNOYem%2FR%20mardown%20step%202.png?alt=media&#x26;token=823aef22-0646-4cac-a509-61ee22272cb6" 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="https://1018070783-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIQKNeqjEeOp9UwUcB9R9%2Fuploads%2F1Vs83Ejl9OOJzykNS0Vu%2FR%20markdown%20step%203.png?alt=media&#x26;token=df2b9491-1fe5-4878-90c7-f8fdcb26d399" 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="https://1018070783-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIQKNeqjEeOp9UwUcB9R9%2Fuploads%2FouoJJujwkrrRhlP15aoP%2FR%20markdown%20step%204.png?alt=media&#x26;token=23acaacc-8d46-49c5-a5ca-94d9feb8532d" 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="https://1018070783-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIQKNeqjEeOp9UwUcB9R9%2Fuploads%2FdQMEZjBS5tCTSeIbE182%2FR%20markdown%205.gif?alt=media&#x26;token=40ff6123-4d61-4a23-9d94-95efd2119e37" alt=""><figcaption><p>Published Report View</p></figcaption></figure>
