25 Appendix: test

Getting Started

This is just a test document, placed at the end of the book.

library(dplyr)

Version 1

25.0.0.1 R

# R code
mtcars$hp %>% mean()
## [1] 146.6875

25.0.0.2 Python

# Python code
import pandas as pd
data = pd.DataFrame({'hello': [1,2,3]})
print(data.hello.mean())
## 2.0

Version 2

# R code
mtcars$hp %>% mean()
## [1] 146.6875

Did it work?