Rd文件中的数学概念

Rd文件中的数学概念

本文介绍了Rd文件中的数学概念/上标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为函数填充Rd文件.

I'm working on filling in an Rd file for a function.

当我在详细信息"部分中使用\ eqn {2 ^ {x}},然后构建并安装该软件包时,没有上标指数.

When I use \eqn{2^{x}} in the Details section, then build and install the package, there is no superscripted exponent.

查看R-exts.pdf,它以Poisson.Rd为例,说明如何使用\ eqn或\ deqn.在该文件的示例中,有一个上标指数.

Looking at R-exts.pdf, it points to Poisson.Rd as an example on how to use \eqn or \deqn. In the example in that file, there is a superscripted exponent.

当我查看Poisson(?Poisson )的帮助文件时,没有上标指数.

When I look at the help file for Poisson (?Poisson), There are no superscripted exponents.

这是我的计算机上的问题还是此标准行为?

Is this an issue on my computer or is this standard behavior?

谢谢!

> sessionInfo()
R version 2.11.1 (2010-05-31)
i386-apple-darwin9.8.0

locale:
[1] en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices datasets  utils     methods   base

other attached packages:
[1] cimis_0.1-3    RLastFM_0.1-4  RCurl_1.4-2    bitops_1.0-4.1 XML_3.1-0      lattice_0.18-8

loaded via a namespace (and not attached):
[1] grid_2.11.1  tools_2.11.1

推荐答案

您没有说出要查找的地方是否有上标指数.我认为是基于文本的帮助,而不是手册的PDF版本?

You don't say where you looked to see if there was a superscripted exponent. I presume the text based help, not the PDF version of the manual?

\ eqn 宏的语法为 \ eqn {latex} {ascii} . {ascii} 位是可选的,在这种情况下,R将最好渲染LaTeX版本.按照惯例,ASCII下标会用[]括起来,并用^代替.

The syntax for the \eqn macro is \eqn{latex}{ascii}. The {ascii} bit is optional, in which case R will do it's best to render the LaTeX version. Conventionally, subscripts in ASCII would be wrapped in [] and superscipts with ^.

所以我会写:

\eqn{2^{x}}{2^x}

但是在所有实际意义上,这些都是相同的.问题仅在于文本帮助无法显示替换文字,而PDF却可以.

But in all practical senses these are the same. The issue is just that the text help can't display superscipts, but the PDF can.

这篇关于Rd文件中的数学概念/上标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-28 03:10