Skip to content

Commit

Permalink
Added a blurb on R script vs R Markdown
Browse files Browse the repository at this point in the history
  • Loading branch information
Gammerdinger authored Oct 7, 2024
1 parent b58223f commit 0d1f584
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lessons/sbatch_Rexercise.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

Create an R script and add the appropriate slurm directives to run it as a batch script using the `sbatch` command from Slurm.

> **RMarkdown vs. R Script**
> RMarkdown is a file format in its most basic form, that can eventually be converted into a shareable document, e.g HTML, PDF and many others. It allows you to document not just your R (Python and SQL) code, but also enables the inclusion of tables, figures, along with descriptive text. However, R Scripts are plain text files that only have code for R to execute. One way to think about the difference between RMarkdown and an R Script is that an R Script likely looks like all of the code within the code blocks in your R Markdown pushed together. Oftentimes when working with RMarkdown, you will likely share the HTML/PDF/etc., but when working with an R script you would share the R script directly.
### Create the R script
* **Type `nano sqrt_input.R` at the command prompt**. This will open up a new script file where you can add the contents of your R script.

Expand Down

0 comments on commit 0d1f584

Please sign in to comment.