I'm trying to insert an equation in to an R documentation such that:
\deqn{p_{x}(1)=Pr(y=1|x)}
but it does come out as I expected where x is a subscript of p.
Does anybody know the reason OR how to subscript p in R documentation?
Subscripts and Superscripts To indicate a subscript, use the underscore _ character. To indicate a superscript, use a single caret character ^ . Note: this can be confusing, because the R Markdown language delimits superscripts with two carets.
Subscripts are those little numbers in the bottom right Sometimes equations may have variables with subscripts (tiny numbers just after the variable). This is especially the case in science subjects such as chemistry or physics.
A quantity displayed below the normal line of text (and generally in a smaller point size), as the " " in , is called a subscript. Subscripts are commonly used to indicate indices ( is the entry in the th row and th column of a matrix ), partial differentiation ( is an abbreviation for.
The subscript will only render properly in the pdf version of your documentation, the HTML version is ASCII only as far as I know. To provide both a latex version of your equation for the pdf as well as a simplified equation for the html help, you can use both arguments of \deqn{<<latex>>}{<<plain>>}
. Take a look for example at the documentation of the `geigen
package for a few examples of providing both:
\deqn{A x = \lambda Bx}{A*x = lambda B*x}
\deqn{(A,B) = (Q S Z^H, Q T Z^H)}{(A,B) = (Q*S*Z^H, Q*T*Z^H)}
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