I am trying to type equations on RMarkdown to create a PDF and I want to use a tilde, how can I go about it. I am trying this but throws back a pandoc.exe: Error producing PDF from TeX source ....
---
title: "See"
date: "24 September 2016"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
follows a Bernouli distribution
$$y_i \~ Bernouli(p_i)$$
Depending on your Markdown processor or editor, you'll use three backticks ( ``` ) or three tildes ( ~~~ ) on the lines before and after the code block.
AltGr + ^ will give you a tilde ~~~~ on a Linux system with an Italian keyboard, which is what you said you were using in the comments. Show activity on this post. You could use this variable when you need tilde in text. Alternately, you could just type tilde and copy and paste the character.
Math inside RMarkdownIn side a text chunk, you can use mathematical notation if you surround it by dollar signs $ for “inline mathematics” and $$ for “displayed equations”. Do not leave a space between the $ and your mathematical notation. Example: $\sum_{n=1}^{10} n^2$ is rendered as ∑10n=1n2.
To make a Greek letter in R, You just use \ and then the name of the letter. If you want a subscript, like β1 , you use $\beta_1$ .
I believe if you do
$$
\sim
$$
This should produce the ~
you are attempting to place in your formula.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With