Error when trying to knit document

I am new to RStudio and have completed my first homework, but am now trying to knit into a pdf and keep receiving an error within my code.


To help us help you, could you please prepare a reproducible example (reprex) illustrating your issue? Please have a look at this guide, to see how to create one:

A screen shot is not a preferred way of sharing your error messages or code. Copy/pasting the code you're using and the error you're seeing as text is a lot easier to work with, and is more likely to get helpful response.

I’m sorry but I literally have no idea what I’m doing or what half the stuff even means

I agree with others that folks will be able to help you more if you give code and data in text format. :slightly_smiling_face:

I do think your error message is pretty helpful here, although knowing what to look for takes practice. One thing I find for R Markdown error messages in particular is that the large block of code for the error can look intimidating and I can feel overwhelmed. But if I step back and look at the actual error, on the first line of the error block of code, I often find that it is telling me exactly what the problem is.

The error message you have is
Error in table(award) : object 'award' not found

This tells me that the problem is when R tried to run the code table(award) while knitting the document. That line of code didn't work.

The message goes on to say that R couldn't find an object named award. While I can see an object named award in your Environment, do you actually make an object named award within the script you are trying to knit?

Try cleaning out your workspace (you can push the little broom button in your Environment panel tab tfor this) and manually re-running your script code (without knitting). What happens then?

1 Like

Can you possibly dumb this down for me, I have no clue what this means or what I’m doing

Use plain text instead of a photo of your screen:

  1. Highlight your code from Rstudio.
  2. Copy it.
  3. Paste it in to the thread here.

Do the same for the error message.

To format it nicely, you can add ``` on the line before and after the code you pasted. That's the markdown to cause it to render in nice monospaced block. E.g.

foo <- 10
will render nicely as:

foo <- 10
1 Like