Error (Issue 385) Knitting Document with Markdown

I'm fairly new to the community and R Studio as a whole so let me know if I'm messing up forum rules.

I'm doing a writeup for a stats project in Markdown, and when I got to knit my document I get an error message. It seems to have a problem with some expressions I'm using to write null and alternative hypotheses. Here's what I have typed:

I don't know how to format on here without it automatically changing

Ho: dollar sign \mu_{1}-\mu_{2}=0dollar sign, Ha: dollar sign\mu_{1}-\mu_{2} > 0dollar sign

and I am getting a message that says:

! Missing inserted. <inserted text>
l.185 (\mu_{1} - \mu_{2} = 0), Ha: $\mu
\emph{{1}-\mu}{2} \neq 0 $

Try to find the following text in HW1.Rmd:
(\mu_{1} - \mu_{2} = 0), Ha: $\mu

You may need to add around a certain inline R expression r in HW1.Rmd (see the above hint).

and then it fails to compile.

Does anyone know what's up?

Does this works for you ?

---
title: "test"
output: 
  pdf_document: default
  html_document: default
---

Ho: $\mu_{1}-\mu_{2}=0$

Ha: $\mu_{1}-\mu_{2} > 0$

I put that code into a new markdown and it knit fine, but when I replace it in the original document it still doesn't work.

I think it might be an issue with using \neq for not equal, but I went through and replaced all those with != and it still didn't knit.

Im very confused

I put it all into a new document and it worked. I guess I did some weird settings thing when I first made the document. I'm dumb

1 Like

Don't blame yourself. This is what Reproducible example are for and why we highly recommend to create some when opening an issue. Creating a reprex helps find this type of weird behavioir.

1 Like

And

If your question's been answered (even by you!), would you mind choosing a solution? It helps other people see which questions still need help, or find solutions if they have similar problems. Here’s how to do it:

1 Like

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