R and Python with Rstudio
R Notebook
```{r}
library(reticulate)
use_python("/usr/bin/python")
data(mtcars)
head(mtcars)
```
```{python}
import numpy
import pandas
print(numpy.pi)
print(type(r.mtcars))
print(pandas.DataFrame.describe(r.mtcars))
print(r.mtcars.describe())
```
```{r}
library(reticulate)
use_python("/usr/bin/python")
data(mtcars)
head(mtcars)
```
```{python}
import numpy
import pandas
print(numpy.pi)
print(type(r.mtcars))
print(pandas.DataFrame.describe(r.mtcars))
print(r.mtcars.describe())
```
评论
发表评论