-
Notifications
You must be signed in to change notification settings - Fork 1
/
p00-Preface.Rmd
64 lines (45 loc) · 2.2 KB
/
p00-Preface.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# Preface {#preface .unnumbered}
```{r 'setup', include=FALSE}
source('_common.R')
```
## Guidelines
- The project will be kept in sync with the latest versions of both Python and R.
- It will be ensured that the code can be executed by direct copy-paste and without significantly affecting user work environment
- Equality & Identity tests related to language rules may be hidden to avoid clutter
## References
- [CRAN R Manuals](https://cran.r-project.org/doc/manuals/) or [CRAN Duplicate](https://cran.r-project.org/manuals.html) :
- [An Introduction to R](https://cran.r-project.org/doc/manuals/R-intro.html)
- [R Installation and Administration](https://cran.r-project.org/doc/manuals/R-admin.html)
- [R Data Import/Export](https://cran.r-project.org/doc/manuals/R-data.html)
- [Writing R Extensions](https://cran.r-project.org/doc/manuals/R-exts.html)
- [R Internals](https://cran.r-project.org/doc/manuals/R-ints.html)
- [R Language Definition](https://cran.r-project.org/doc/manuals/R-lang.html)
- [R FAQ](https://cran.r-project.org/doc/manuals/R-FAQ.html)
- [Python](https://docs.python.org/3/index.html) :
- [Python Standard Library](https://docs.python.org/3/library/index.html)
- [Python Language Reference](https://docs.python.org/3/reference/index.html)
- [Python Tutorial](https://docs.python.org/3/tutorial/index.html)
- [Python HOWTO](https://docs.python.org/3/howto/index.html)
## Prerequisites
```{r 'R-Version', decorate=TRUE}
strsplit(R.version.string, ' ')[[1]][3] # R Version
```
```{python 'Y-Version', decorate=TRUE}
print(sys.version.split()[0]) # Python Version
```
## Environment
```{r 'R-Attached-Packages', decorate=TRUE}
# Attached (Basic) Packages in R
sessionInfo()
```
```{python 'Y-Loaded-Modules', decorate=TRUE}
# Count & List the Imported (Basic) Modules in Python
pp = [v.__name__ for k, v in globals().items()
if type(v) is types.ModuleType and not k.startswith('__')]
len(pp) # Count the Loaded Modules
', '.join(pp) # List Modules
```
```{r 'R-Python-Configuration', decorate=TRUE}
# Python Configuration with R Package 'Reticulate'
py_config()
```