Chunk will not render in quarto, but executes fine


I hope someone can help me solve an issue in Quarto. I am trying to render a pdf, the code works fine in R, also the chunk I have issues with executes fine in Quarto, but when I render it, it halts with this message:

processing file: DSS.qmd |.......................................... | 83% (unnamed-chunk-26)Quitting from lines 368-448 (DSS.qmd) Error in [.data.frame(all, , 51:55) : undefined columns selected Calls: .main ... eval_with_user_handlers -> eval -> eval -> alpha -> [ -> [.data.frame Execution halted

It is saying that these columns don't exist..they do, and the code works fine both in R and in Quarto itself, just won't work when rendering.

would really appreciate your help, I am going crazy with this! Thank you in advance!

Welcome to the forum.

We need to see your code and some sample data. See
FAQ Asking Questions

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


Thank you for your reply! I have in the mean time solved the problem. Have a nice day!

As a service to the general public it would be nice if you indicated HOW you solved the problem. :grinning:

It was a banal oversight from my side. I named 2 datasets "all" in separate analysis in R but Quarto manged to pull the other dataset somehow from the middle of the document down. So I just respcified in the R chunk right before the problematic lines which of these data sets was to be used and it rendered fine. I stil have not found out why did this happen, but as I've got the result I wanted i just moved on. :slight_smile:

This topic was automatically closed 42 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.