R to Python
I Thoughts of an R programmer Learning Python
1
Front Material
1.1
Colophon
1.2
Preface
2
Introduction
II R and Python, Side by Side
3
A Comparative Look
3.1
Functional Programming Commonalities.
3.2
Building Blocks of Functions as Procedures
3.2.1
Statements and Expressions
3.2.2
Assignment of Values to Memory and the Variable
3.2.3
Decisions and Choices
3.2.4
Doing it Over Again (and again …)
3.2.5
Functions
3.2.6
Objects and Classes anticipating Object-Oriented Programming
4
Set-up for R and Python Exercises
4.1
Package Libraries
4.2
Pulling it Together
4.2.1
The Prompts
4.2.2
Installing Packages
4.2.3
Using Packages
4.3
Using R and Python Together
4.3.1
Working in R and Calling Python
4.3.2
Working in Python and Calling R
4.3.3
Working in Jupyter and Writing in R, Python or Both in the Same Notebook
4.3.4
Working in rmarkdown and Using R and Python Code Chunks
5
Basic Mathematics in R and Python
5.1
Add, Subtract, Multiply and Divide
5.1.1
R Scripting
5.1.2
Python Scripting
5.2
Other basic algebraic operators in R and Python
6
Functional Programming with R and Python
6.1
Defining Functions
6.1.1
R Scripting
6.1.2
Python Scripting
6.2
Calling and Using Functions
6.2.1
R Scripting
6.2.2
Python Scripting
6.3
Writing Function Examples in R and Python
6.4
Using the Core R and Python Standard Libraries
6.4.1
R Scripting
6.4.2
Python Scripting
6.4.3
More Function Examples
7
Object-Oriented Programming with R and Python
7.1
Defining Classes in R and Python
7.2
Using Objects and Classes
7.2.1
R Scripting
7.2.2
Python Scripting
III Data Science Topics in Python Compared to R
8
Clean and Tidy Data
8.1
Reproducibility
8.2
R Data Munging
8.3
Python Data Munging
9
Using Probability Distributions with R and Python
9.1
Basic Probability Issues
9.1.1
R Scripting
9.1.2
Python Scripting
9.2
Using the Distrbutions
9.2.1
Python Scripting
9.3
Other Libraries with Probability and Statistical Packages
9.3.1
R Scripting
9.3.2
Python Scripting
10
Descriptive Statistics and Data Exploration
10.1
Defining Functions
10.1.1
R Scripting
10.1.2
Python Scripting
10.2
Calling and Using Functions
10.2.1
R Scripting
10.2.2
Python Scripting
10.3
The Core or Standard Libraries
10.3.1
R Scripting
10.3.2
Python Scripting
11
Statistical Analysis and Modeling
11.1
Defining the Available Functions
11.1.1
R Scripting
11.1.2
Python Scripting
11.2
Calling and Using Functions
11.2.1
R Scripting
11.2.2
Python Scripting
12
Non-Stochastic Models
13
Reproducible Research
14
References
15
Bibliography
IV Appendices
16
Appendix 1 -Comparative Syntax for Programming Constructs of R and Python
16.1
Extended Structures
17
Appendix 2 - Mixed R and Python
17.1
Examples with rMarkdown and Jupyter-SOS Notebooks
17.1.1
Using rmarkdown as a Mixed Language Environment
17.1.2
Using Jupyter with SOS as a Mixed Language Environment
18
Appendix 3 - R and Python Packages
18.1
R Core Package List
18.2
Python
Standard Library
2
List
18.2.1
Built-in Functions
2
18.2.2
Built-in Constants
18.2.3
Built-in Types
18.2.4
Built-in Exceptions
18.2.5
Text Processing Services
18.2.6
Binary Data Services
18.2.7
Data Types
18.2.8
Numerical and Mathematical Modules
18.2.9
Functional Programming Modules
18.2.10
File and Directory Access
18.2.11
Data Persistence
18.2.12
Data Compression and Archiving
18.2.13
File Formats
18.2.14
Cryptographic Services
18.2.15
Generic Operating System Services
18.2.16
Concurrent Execution
18.2.17
Context Variables
18.2.18
Networking and Interprocess Communication
18.2.19
Internet Data Handling
18.2.20
Structured Markup Processing Tools
18.2.21
Internet Protocols and Support
18.2.22
Multimedia Services
18.2.23
Internationalization
18.2.24
Program Frameworks
18.2.25
Graphical User Interfaces with Tk
18.2.26
Development Tools
18.2.27
Debugging and Profiling
18.2.28
Software Packaging and Distribution
18.2.29
Python Runtime Services
18.2.30
Custom Python Interpreters
18.2.31
Importing Modules
18.2.32
Python Language Services
18.2.33
Miscellaneous Services
18.2.34
MS Windows Specific Services
18.2.35
Unix Specific Services
18.2.36
Undocumented Modules
18.3
Other Package Sources (Third Party)
18.3.1
CRAN R Package Repository
18.3.2
PyPI - Python Package Index
19
Appendix 4 - Selected Tutorials and Learning Resources
Published with bookdown
R to Python
13
Reproducible Research