RStudio not rendering in Quarto

I am trying to render code in R through Quarto, but am given the message I have pasted below. If it helps at all, earlier today I tried to resolve this issue and saved a file to my computer beginning with a '.', but quite honestly don't remember exactly what I did. Thanks.

Error: 'insertRmdChunk' is not an exported object from 'namespace:rstudioapi'
Execution halted
Problem with running R found at /Library/Frameworks/R.framework/Resources/bin/Rscript to check environment configurations. Please check your installation of R.

Welcome to the forum.

It looks like you have some kind of RStudio command embedded in your code. I would suggest hunting it down and deleting it.

Otherwise we really need to need your code.

Just copy the raw code and paste it between


Some sample raw data might also be useful.
A handy way to supply some sample data is the dput() function. In the case of a large dataset something like dput(head(mydata, 100)) should supply the data we need. Just do dput(mydata) where mydata is your data. Copy the output and paste it here between


If your code above is working than the problem must be elsewhere in the Ouarto document. Providing working code is unlikely to help us trouble-shoot your problem.

The code functions properly in a Quarto document here.

What would be the best way to go about finding exactly what/where this issue is?

Paste all your code here, though you can probably delete pure text paragraphs. At the very least we neet to see your Yaml and all code segments.

This is quite likely but you seem to have given us tho "visual editor version of the .qmd which is not as useful as one might like and no sample data.

I think a minor bit of editing can solve the first problem but without the data we cannot, realistically do much.

PS: You did not supply the yaml

We need the code. Something this is using rstudioapi code, and rstudioapi won't work in Quarto rendering.

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.