Access R and Python

Author

David Gerbing

Published

Oct 2, 2025, 06:24 pm

RStudio

If you are reading the web version of this document and you prefer Dark Mode, click on the slider button in the top-right corner.

The following material with illustrative videos shows how to access R and Python. Access from a free download on your computer or a free (with limitations) cloud account from which to run code from any device with a web browser. The discussions include examples of running the code and the output generated.

The RStudio environment is my preferred environment for both writing any type of document and, of course, writing R and Python code embedded within a document. If you develop R and Python in RStudio then there is only one environment to learn. Otherwise, you do RStudio for R and Jupyter Notebook for Python.

From within RStudio, run interactively at the R or Python command prompt, or base your R and Python code and descriptive writing in markdown as part of the recommended quarto document system, a more powerful alternative that redefines computer output. Writing with quarto from Jupyter Notebook is now also possible. The following material illustrates the interactive environment with R and the quarto markdown environment with Python. This choice of languages and development environments is arbitrary as either, and simultaneously both, code from both languages can be implemented interactively or with markdown.

R

The primary introduction to R with examples of my lessR functions is linked below.

Access R, includes Intro and Analysis.

This material includes embedded videos to show how to proceed at each step of an interactive analysis, entering instructions at the interactive R prompt at the R console: >.

A video of a complete example [7:56] of creating a bar chart and pie chart that relies upon the material linked above is also available. The example proceeds by relying upon the above document. It illustrates copying the relevant instruction, function call, from the document, pasting into a text file for adaptation or directly into the console, and then changing the variable names to be consistent with the new example data. Once the environment is set up, the goal is just copy and paste from a working example and do the minor adaptations to the current example.

Python

Access Python Intro + RStudio and Python option with video [23:26] + Python Analysis

These videos cover the same material presented in the links to the written Python Analysis material, in the format of Jupyter Notebook. The code is the same entered in RStudio or in Jupyter Notebook.

  1. Import Packages [13:51]
  2. Read and Display Data [16:27]]
  3. Visualize a Distribution [11:28], no pie chart in the video
  1. The Python Intro shows how to access the Anaconda Distribution of Python, both on your computer and in the cloud. Then it introduces the Jupyter Notebook environment, which can be skipped if doing Python in RStudio, easier if you only want to learn one coding environment.
  2. The RStudio and Python option shows how to do Python in the RStudio environment, illustrating two options: entering code at the interactive prompt and via quarto markdown, of which you choose one, with the markdown approach ultimately more useful and general.
  3. The Python Analysis does a basic Python data analysis in the RStudio environment. The same Python code applies to the Jupyter Notebook environment, except instead of pasting each piece into a Python Code Chunk you paste into a Notebook Cell.

Also available is a video of a complete example [12:33] of creating a bar chart and a pie chart with Python in RStudio using Quarto. The example proceeds by relying upon the above document Python Analysis. It illustrates copying the relevant instruction, function call, from the document, pasting into the markdown document that will be analyzed, and then changing the variable names to be consistent with the new example data. Once the environment is set up, the goal is just copy and paste from a working example and do the minor adaptations to the current example.