Skip to content

in quarto convert failing to convert R cells? #11787

Open
@MichelNivard

Description

@MichelNivard

Bug description

HI I think quite convert is failing when sed iwht r cells?

I am trying to cover .qmd to .ipynb on Mac, quarto: 1.6.40, r: .4.4.1

this is my qmd file"

---
title: 'test conversion'
---

```{r}
library(tinyplot)
```

# Introduction

This document is a test...

```{r}
a <- rnorm(100)
hist(a)
```

Does it work? I don't know?

which generates this .ipynb (pasting raw .json but basically the entire thing is in one big markdown cell):

{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"---\n",
"title: 'test conversion'\n",
"---\n",
"\n",
"{r}\n", "library(tinyplot)\n", "\n",
"\n",
"# Introduction\n",
"\n",
"This document is a test...\n",
"\n",
"{r}\n", "a <- rnorm(100)\n", "hist(a)\n", "\n",
"\n",
"Does it work? I don't know?\n"
]
}
],
"metadata": {
"kernelspec": {
"name": "python3",
"language": "python",
"display_name": "Python 3 (ipykernel)",
"path": "/Users/michelnivard/miniconda3/share/jupyter/kernels/python3"
}
},
"nbformat": 4,
"nbformat_minor": 4
}

the expected behaviour here would be a series of:

1 raw cells with the yaml
1 code cell: library(tinyplot)
1 markdown cell:
Introduction

This document is a test...
1 code cell:
a <- rnorm(100)
hist(a)
1 markdown cell:
Does it work? I don't know?

I think its failing because the conversion expects only python cells?

Conversion work fine if I change the r cells to python cells...

Steps to reproduce

No response

Expected behavior

No response

Actual behavior

No response

Your environment

No response

Quarto check output

quarto check
Quarto 1.6.40
[✓] Checking environment information...
Quarto cache location: /Users/michelnivard/Library/Caches/quarto
[✓] Checking versions of quarto binary dependencies...
Pandoc version 3.4.0: OK
Dart Sass version 1.70.0: OK
Deno version 1.46.3: OK
Typst version 0.11.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
Version: 1.6.40
Path: /Applications/quarto/bin

[✓] Checking tools....................OK
TinyTeX: v2023.01
Chromium: (not installed)

[✓] Checking LaTeX....................OK
Using: TinyTex
Path: /Users/michelnivard/Library/TinyTeX/bin/universal-darwin
Version: 2022

[✓] Checking basic markdown render....OK

[✓] Checking Python 3 installation....OK
Version: 3.10.8 (Conda)
Path: /Users/michelnivard/miniconda3/bin/python
Jupyter: 5.7.1
Kernels: ir, python3

[✓] Checking Jupyter engine render....OK

[✓] Checking R installation...........OK
Version: 4.4.1
Path: /Library/Frameworks/R.framework/Resources
LibPaths:
- /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library
knitr: 1.48
rmarkdown: 2.27

[✓] Checking Knitr engine render......OK

(base) michelnivard@michels-MacBook-Air resolve-demo-doc %

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingconvertRelated to quarto convert command

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions