2

I am using 32-bit Revolution R Enterprise (7.3) GUI for R (3.1.1) on 64-bit Windows 8.1.

When a function (say, urca::ca.jo) is right-clicked in Object Browser of RevoREnt after its package is loaded, an html file is shown in an opened window: in my notebook, it is http://127.0.0.1:25449/library/urca/html/ca.jo.html whose title is "R: Johansen Procedure for VAR - Revolution R Enterprise Help - Microsoft Document Explorer".

In this window, unfortunately, mathematical expressions are displayed in a latex-type code such as:

Details
Given a general VAR of the form:
\bold{X}_t = \bold{Π}1 \bold{X}{t-1} + … + \bold{Π}k \bold{X}{t-k} + \bold{μ} + \bold{Φ D}_t + \bold{\varepsilon}_t , \quad (t = 1, …, T),

Naturally, understanding what is going on from these expressions are really cumbersome. I am going to the PDF file of the related package to see clearly what these expressions are. Is not there any way to see them in the right-clicked-opened-window without going to PDF file?

By the way, I do not know whether this behaviour is same in "Base R" and "RStudio" GUIs.

I think there are many coder in my position, surely, we would greatly appreciate any help to this issue.

Erdogan CEVHER
  • 1,788
  • 1
  • 21
  • 40

1 Answers1

1

http://127.0.0.1 is a location on your computer, not accessible to anyone else. All users have a similar mechanism for viewing their help files. The authors of that package do not appear to understand how to write expressions in the particular markdown/markup language that the R help browser uses. That's what we are all seeing. You should probably look at the PDF version of that function's documentation: Page 11 of https://cran.r-project.org/web/packages/urca/urca.pdf

If you look at the "Writing R Extensions" document you will find the secret incantation in section 2.6 which on my machine is at: http://127.0.0.1:29569/doc/manual/R-exts.html#Mathematics (but it appears that the port is different on your machine.) To find it I simply searched on the word "Greek" in that document:

To this end, the two commands \eqn{latex}{ascii} and \deqn{latex}{ascii} are used. Whereas \eqn is used for “inline” formulae (corresponding to TeX’s $…$), \deqn gives “displayed equations” (as in LaTeX’s displaymath environment, or TeX’s $$…$$). Both arguments are treated as ‘verbatim’ text.

IRTFM
  • 258,963
  • 21
  • 364
  • 487
  • I looked at the PDF file of urca. You say "..how to write expressions in the particular markdown/markup language that the R help browser uses..". Do you know any R package from which we can clearly see math'l expressions in html file in R help browser? – Erdogan CEVHER Apr 27 '16 at 02:07
  • Thanks 42-, your reply is quite helpful. Your way clearly simplifies the things to great extent. That said, look at stats:FDist's help inter alia (Fdist.html) to see f(x) = Γ((n1 + n2)/2) / (Γ(n1/2) Γ(n2/2)) (n1/n2)^(n1/2) x^(n1/2 - 1) (1 + (n1/n2) x)^-(n1 + n2)/2. This is understandable since no backslash latex code is seen. By the way, we need to wait more, I think, to see long fraction line for 2 below (n1 + n2) where 1 and 2 are subscripted, properly-shown integral signs, reflection of all other math'l notation etc. as they appear in PDFs. – Erdogan CEVHER Apr 27 '16 at 14:38