Hey there,
if I use python chunks in my RMarkdown file, I always get the error when I try to knit it:
Quitting from lines 12-22 (Test.Rmd)
Error in py_call_impl(callable, dots$args, dots$keywords) :
TypeError: _repr_html_() missing 1 required positional argument: 'self'
Calls: <Anonymous> ... eng_python_autoprint -> as_r_value -> <Anonymous> -> py_call_impl
Execution halted
If I simply run the code, there are no problems.
---
title: "Untitled"
output: html_document
date: '2022-06-05'
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
```{python}
import seaborn as sns
# Load an example dataset
tips = sns.load_dataset("tips")
# class is a pandas.core.frame.DataFrame
type(tips)
```
```{r}
# access with py$variable_name
tips <- py$tips
# class is a R data.frame
class(tips)
```
Versions:
platform x86_64-w64-mingw32
arch x86_64
os mingw32
crt ucrt
system x86_64, mingw32
status
major 4
minor 2.0
year 2022
month 04
day 22
svn rev 82229
language R
version.string R version 4.2.0 (2022-04-22 ucrt)
nickname Vigorous Calisthenics