THE BASICS OF PYTHON AND R

Chantal D. Larose, Daniel T. Larose · 2019

In Python, as in most other programming languages, programmers run code which performs an action. Some actions also generate output. There are five kinds of actions, namely using comments, importing packages, executing commands, saving output, and getting data into Python. With R, as with Python, programmers execute a command which generates output. Much of the structure of R code will feel similar to Python code, with a few important differences. To run Python code, programmers need to use a Python compiler. Before describing the Python coding, this chapter addresses one more thing: how to obtain and tweak graphical output in Python. The use of comments is just as important for coding in R as they are for coding in Python. As with Python, there will be times when programmers want R to give them a particular record or variable.

Read the paper · More papers on PaperTik