Skip to content

Commit f23640e

Browse files
committed
add positron tips
1 parent 14dfa11 commit f23640e

9 files changed

Lines changed: 38 additions & 20 deletions
239 KB
Loading
221 KB
Loading

blogs/posts/rstudio_and positron_ide_tips.qmd

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "RStudio and Positron IDE Tips to Make Your Workflows Efficient!"
33
author: "Jyoti Bhogal"
4-
categories: [RStudio, Positron, Beginner]
4+
categories: [RStudio, Positron, Data Science, IDE, Beginner]
55
image: ../images/ilija-boshkov-0nI1DczRQAM-unsplash.jpg
66
---
77

@@ -19,8 +19,7 @@ RStudio is a free and open-source integrated development environment (IDE) that
1919
- **Adopt a consistent folder structure**: Organise your project directory with sub-folders for clarity, such as `data/` (with `raw/` and `processed/` subdirectories), `scripts/`, and `output/` (for figures and reports).
2020
- **Create dynamic reports rather than static**: One can use R markdown or a quarto file to create a dynamic output document, slides, or website. This allows you to integrate code and narrative text, making it easier to update and reproduce your analysis.
2121

22-
![Image: Starting a dynamic *R markdown* or *Quarto* document](../images/blog_2_dynamic_document.png)
23-
- **Integrate Version Control using Git or GitHub**: RStudio has a built in *Terminal* as well as a *Git* pane to help you manage version control. This allows you to track code or text changes, collaborate with others on shared and/or open source projects, and maintain a history of your project.
22+
![Image: Starting a dynamic R markdown or Quarto document](../images/blog_2_dynamic_document.png) - **Integrate Version Control using Git or GitHub**: RStudio has a built in *Terminal* as well as a *Git* pane to help you manage version control. This allows you to track code or text changes, collaborate with others on shared and/or open source projects, and maintain a history of your project.
2423

2524
![Image: Integrated git panel for version control](../images/blog_2_integrated_git_panel.png)
2625

@@ -40,11 +39,18 @@ RStudio is a free and open-source integrated development environment (IDE) that
4039

4140
![Image: Code chunks in an R markdown file](../images/blog_2_code_chunk.png)
4241

42+
- **Do not save workspace image**: It is suggested to not save the workspace image while exiting RStudio to make the analysis reproducible. Saving the workspace (`.RData` file) captures the state of your R session, including all loaded objects, variables, and functions. While convenient for restarting, it makes it difficult for others (or your future self) to reproduce your results without that specific `.RData` file. A truly reproducible analysis relies on a script that, when run from a clean environment, generates all necessary objects and results.
43+
44+
![Image: Pop-up for saving the `.RData` file](../images/blog_2_workspace_dont_save.png)
45+
4346
# Positron IDE tips
4447

4548
Positron is an IDE that combines exploration and production work in one free, AI-assisted environment, empowering the full spectrum of data science in Python and R. It helps to quickly move from data to insight to application in one code editor. The UI is rather similar to that of Visual Studio Code. Here are some tips to enhance your workflow in Positron:
4649

47-
- **Tip 1**:
50+
- **Easily switch between Python and R**: It supports Python and R equally well. In RStudio, if one tries to run Python, it requires them to install certain packages and also install Jupyter separately. In Positron, you can seamlessly switch between R and Python with just 2 click.
51+
52+
![Image: Switching between *Python* and *R*](../images/blog_2_switch_python_r.png)
53+
4854
- **Tip 2**:
4955
- **Tip 3**:
5056
- **Tip 4**:
239 KB
Loading
221 KB
Loading

docs/blogs/images/new_project.png

-436 KB
Binary file not shown.

docs/blogs/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ <h5 class="no-anchor card-title listing-title">
242242
</div>
243243
</div></a>
244244
</div>
245-
<div class="g-col-1" data-index="1" data-categories="UlN0dWRpbyUyQ1Bvc2l0cm9uJTJDQmVnaW5uZXI=" data-listing-file-modified-sort="1763731359153" data-listing-reading-time-sort="3" data-listing-word-count-sort="494">
245+
<div class="g-col-1" data-index="1" data-categories="UlN0dWRpbyUyQ1Bvc2l0cm9uJTJDRGF0YSUyMFNjaWVuY2UlMkNJREUlMkNCZWdpbm5lcg==" data-listing-file-modified-sort="1763735474945" data-listing-reading-time-sort="4" data-listing-word-count-sort="638">
246246
<a href="../blogs/posts/rstudio_and positron_ide_tips.html" class="quarto-grid-link">
247247
<div class="quarto-grid-item card h-100 card-left">
248248
<p class="card-img-top">

docs/blogs/posts/rstudio_and positron_ide_tips.html

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,8 @@ <h1 class="title">RStudio and Positron IDE Tips to Make Your Workflows Efficient
150150
<div class="quarto-categories">
151151
<div class="quarto-category">RStudio</div>
152152
<div class="quarto-category">Positron</div>
153+
<div class="quarto-category">Data Science</div>
154+
<div class="quarto-category">IDE</div>
153155
<div class="quarto-category">Beginner</div>
154156
</div>
155157
</div>
@@ -235,12 +237,29 @@ <h1>RStudio IDE tips</h1>
235237
<figcaption>Image: Code chunks in an R markdown file</figcaption>
236238
</figure>
237239
</div>
240+
<ul>
241+
<li><strong>Do not save workspace image</strong>: It is suggested to not save the workspace image while exiting RStudio to make the analysis reproducible. Saving the workspace (<code>.RData</code> file) captures the state of your R session, including all loaded objects, variables, and functions. While convenient for restarting, it makes it difficult for others (or your future self) to reproduce your results without that specific <code>.RData</code> file. A truly reproducible analysis relies on a script that, when run from a clean environment, generates all necessary objects and results.</li>
242+
</ul>
243+
<div class="quarto-figure quarto-figure-center">
244+
<figure class="figure">
245+
<p><img src="../images/blog_2_workspace_dont_save.png" class="img-fluid figure-img"></p>
246+
<figcaption>Image: Pop-up for saving the <code>.RData</code> file</figcaption>
247+
</figure>
248+
</div>
238249
</section>
239250
<section id="positron-ide-tips" class="level1">
240251
<h1>Positron IDE tips</h1>
241252
<p>Positron is an IDE that combines exploration and production work in one free, AI-assisted environment, empowering the full spectrum of data science in Python and R. It helps to quickly move from data to insight to application in one code editor. The UI is rather similar to that of Visual Studio Code. Here are some tips to enhance your workflow in Positron:</p>
242253
<ul>
243-
<li><strong>Tip 1</strong>:</li>
254+
<li><strong>Easily switch between Python and R</strong>: It supports Python and R equally well. In RStudio, if one tries to run Python, it requires them to install certain packages and also install Jupyter separately. In Positron, you can seamlessly switch between R and Python with just 2 click.</li>
255+
</ul>
256+
<div class="quarto-figure quarto-figure-center">
257+
<figure class="figure">
258+
<p><img src="../images/blog_2_switch_python_r.png" class="img-fluid figure-img"></p>
259+
<figcaption>Image: Switching between <em>Python</em> and <em>R</em></figcaption>
260+
</figure>
261+
</div>
262+
<ul>
244263
<li><strong>Tip 2</strong>:</li>
245264
<li><strong>Tip 3</strong>:</li>
246265
<li><strong>Tip 4</strong>:</li>

docs/search.json

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,13 @@
2727
"section": "",
2828
"text": "Introduction to Shiny\n\n\n\n\n\n\nRonak Shah\n\n\n\n\n\n\n\n\n\n\n\n\n\nRStudio and Positron IDE Tips to Make Your Workflows Efficient!\n\n\n\n\n\n\nJyoti Bhogal\n\n\n\n\n\n\nNo matching items"
2929
},
30+
{
31+
"objectID": "blogs/posts/rstudio_and positron_ide_tips.html",
32+
"href": "blogs/posts/rstudio_and positron_ide_tips.html",
33+
"title": "RStudio and Positron IDE Tips to Make Your Workflows Efficient!",
34+
"section": "",
35+
"text": "RStudio and Positron are IDEs useful for running R programming language code. In this blog, we will explore some tips and tricks to make your workflow more efficient while using these IDEs.\n\nRStudio IDE tips\nRStudio is a free and open-source integrated development environment (IDE) that enhances the user experience for the R programming language. Here are some tips to enhance your workflow in RStudio:\n\nNew Project for a new analysis: For a new code, use New Project and then create the necessary files (.R, .Rmd, .qmd, etc.) inside the New Project. This helps is keeping the r environment including the dependencies separate for separate projects.\n\n\n\n\nImage: Starting a ‘New Project’\n\n\n\nFour panels in RStudio: Familiarise yourself with the four-panel layout of RStudio (Source, Console, Environment/History, Files/Plots/Packages/Help). This layout helps you efficiently manage your coding, output, and resources.\nAdopt a consistent folder structure: Organise your project directory with sub-folders for clarity, such as data/ (with raw/ and processed/ subdirectories), scripts/, and output/ (for figures and reports).\nCreate dynamic reports rather than static: One can use R markdown or a quarto file to create a dynamic output document, slides, or website. This allows you to integrate code and narrative text, making it easier to update and reproduce your analysis.\n\n - Integrate Version Control using Git or GitHub: RStudio has a built in Terminal as well as a Git pane to help you manage version control. This allows you to track code or text changes, collaborate with others on shared and/or open source projects, and maintain a history of your project.\n\n\n\nImage: Integrated git panel for version control\n\n\n\nSpell Check feature: Use the spell check feature from Edit -&gt; Check Spelling... to ensure your code comments and documentation are free from typos.\n\n\n\n\nImage: Spell check feature in Edit menu\n\n\n\nHistory: Go through the History tab to review previously run commands. You can easily re-run or copy commands from your history to save time.\n\n\n\n\nImage: History tab\n\n\n\nEnvironment: Use this section to have a cursory look at the active variables and a glimpse of the values stored in them.\n\n\n\n\nImage: Environment tab\n\n\n\nRunning code in chunks: In R markdown and quarto files, use the features to run selected lines, current chunk, next chunk, all the chunks, all the chunks above, and all the chunks below to efficiently test and run your code.\n\n\n\n\nImage: Code chunks in an R markdown file\n\n\n\nDo not save workspace image: It is suggested to not save the workspace image while exiting RStudio to make the analysis reproducible. Saving the workspace (.RData file) captures the state of your R session, including all loaded objects, variables, and functions. While convenient for restarting, it makes it difficult for others (or your future self) to reproduce your results without that specific .RData file. A truly reproducible analysis relies on a script that, when run from a clean environment, generates all necessary objects and results.\n\n\n\n\nImage: Pop-up for saving the .RData file\n\n\n\n\nPositron IDE tips\nPositron is an IDE that combines exploration and production work in one free, AI-assisted environment, empowering the full spectrum of data science in Python and R. It helps to quickly move from data to insight to application in one code editor. The UI is rather similar to that of Visual Studio Code. Here are some tips to enhance your workflow in Positron:\n\nEasily switch between Python and R: It supports Python and R equally well. In RStudio, if one tries to run Python, it requires them to install certain packages and also install Jupyter separately. In Positron, you can seamlessly switch between R and Python with just 2 click.\n\n\n\n\nImage: Switching between Python and R\n\n\n\nTip 2:\nTip 3:\nTip 4:\nTip 5:"
36+
},
3037
{
3138
"objectID": "blogs/posts/intro-to-shiny.html",
3239
"href": "blogs/posts/intro-to-shiny.html",
@@ -110,19 +117,5 @@
110117
"title": "About",
111118
"section": "",
112119
"text": "About this site\n\n1 + 1\n\n[1] 2"
113-
},
114-
{
115-
"objectID": "blogs/posts/rstudio_and positron_ide_tips.html",
116-
"href": "blogs/posts/rstudio_and positron_ide_tips.html",
117-
"title": "RStudio and Positron IDE Tips to Make Your Workflows Efficient!",
118-
"section": "",
119-
"text": "RStudio and Positron are IDEs useful for running R programming language code. In this blog, we will explore some tips and tricks to make your workflow more efficient while using these IDEs.\n\nRStudio IDE tips\nRStudio is a free and open-source integrated development environment (IDE) that enhances the user experience for the R programming language. Here are some tips to enhance your workflow in RStudio:\n\nNew Project for a new analysis: For a new code, use New Project and then create the necessary files (.R, .Rmd, .qmd, etc.) inside the New Project. This helps is keeping the r environment including the dependencies separate for separate projects.\n\n\n\n\nImage: Starting a ‘New Project’\n\n\n\nFour panels in RStudio: Familiarise yourself with the four-panel layout of RStudio (Source, Console, Environment/History, Files/Plots/Packages/Help). This layout helps you efficiently manage your coding, output, and resources.\nAdopt a consistent folder structure: Organise your project directory with sub-folders for clarity, such as data/ (with raw/ and processed/ subdirectories), scripts/, and output/ (for figures and reports).\nCreate dynamic reports rather than static: One can use R markdown or a quarto file to create a dynamic output document, slides, or website. This allows you to integrate code and narrative text, making it easier to update and reproduce your analysis.\n\n - Integrate Version Control using Git or GitHub: RStudio has a built in Terminal as well as a Git pane to help you manage version control. This allows you to track code or text changes, collaborate with others on shared and/or open source projects, and maintain a history of your project.\n\n\n\nImage: Integrated git panel for version control\n\n\n\nSpell Check feature: Use the spell check feature from Edit -&gt; Check Spelling... to ensure your code comments and documentation are free from typos.\n\n\n\n\nImage: Spell check feature in Edit menu\n\n\n\nHistory: Go through the History tab to review previously run commands. You can easily re-run or copy commands from your history to save time.\n\n\n\n\nImage: History tab\n\n\n\nEnvironment: Use this section to have a cursory look at the active variables and a glimpse of the values stored in them.\n\n\n\n\nImage: Environment tab\n\n\n\nRunning code in chunks: In R markdown and quarto files, use the features to run selected lines, current chunk, next chunk, all the chunks, all the chunks above, and all the chunks below to efficiently test and run your code.\n\n\n\n\nImage: Code chunks in an R markdown file\n\n\n\n\nPositron IDE tips\nPositron is an IDE that combines exploration and production work in one free, AI-assisted environment, empowering the full spectrum of data science in Python and R. It helps to quickly move from data to insight to application in one code editor. The UI is rather similar to that of Visual Studio Code. Here are some tips to enhance your workflow in Positron:\n\nTip 1:\nTip 2:\nTip 3:\nTip 4:\nTip 5:"
120-
},
121-
{
122-
"objectID": "blogs/posts/sample.html",
123-
"href": "blogs/posts/sample.html",
124-
"title": "sample",
125-
"section": "",
126-
"text": "a = c(2,5,8,3,-10,4.5)\n\n\ncar = data.frame(\"Model_Name\"=c(\"creta\",\"zen\",\"swift\"),\"Mileage\"=c(\"25\",\"30\",\"34\"))\nprint(car)\n\n Model_Name Mileage\n1 creta 25\n2 zen 30\n3 swift 34\n\n\n\nx &lt;- c(0,1,3,2,0,1,1,3,2,4,0,7,1,2,1,3,4,2)\nhist(x, main=\"Histogram of x\", xlab=\"Values\", ylab=\"Frequency\", col=\"lightblue\", border=\"black\")"
127120
}
128121
]

0 commit comments

Comments
 (0)