How to type tilde in formulas in RMarkdown

谁说胖子不能爱 提交于 2019-12-05 22:51:38

问题


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)$$

回答1:


I believe if you do

$$
\sim
$$

This should produce the ~ you are attempting to place in your formula.



来源:https://stackoverflow.com/questions/39671612/how-to-type-tilde-in-formulas-in-rmarkdown

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!