Displaying 20 results from an estimated 1300 matches similar to: "Line breaks in mathematical formulae in Rd files (PR#13287)"
2010 Apr 09
2
Line breaks in mathematical formulae in Rd files
Hello,
I would like to implement the feature request described here:
https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=13287. I think
this is a very worthwhile feature.
However, I need just a little push in the right direction. When I
added either a new command or change the old one to use eqnarray as
proposed, the "\\" newline characters were not properly passed to
latex - even
2013 Aug 28
1
Error when using buildVignettes()
Dear all,
When running function 'testQAReport()', which uses function
'buildVignettes()' to create a pdf-file I get the following error:
> source("testQAReport.R")
> testQAReport()
Error in .get_package_metadata(pkgdir) :
Files 'DESCRIPTION' and 'DESCRIPTION.in' are missing.
Since I did not get this error in earlier versions of R, could you
2004 Nov 09
0
Is nesting {} inside \eqn OK?
I'm seeing various things fail when I try to next braces inside \eqn.
This source
\eqn{{\bf\beta}_j}{b(j)} is the vector
produces this error
----------------------------------------------
[4]
! Missing $ inserted.
<inserted text>
$
l.258 \eqn{{\bf\beta}_j}{\bf\beta}_
j{{b(j)} is the vector of
coefficients fo...
I've inserted a
2000 Apr 17
3
Maths in R documentation (PR#523)
The document R-exts contains the following example of using
mathematics in R documentation.
\deqn{p(x) = {\lambda^x\ \frac{e^{-\lambda}}{x!}}
{p(x) = lambda^x exp(-lambda)/x!}
There is a syntax error in there, but that's not my point.
The problem is that using "R CMD Rd2dvi" I find that putting
the alternate forms of the equation on top of each other doesn't
work.
2008 Aug 25
1
Displaying Equations in Documentation
I'm currently working on writing up some documentation for some of my
code, but am having the darndest time coding in equations. For
example, the equation in the following:
\details{ Calculated the R Squared for observed endogenous variables
in a structural equation model, as well as several other useful
summary statistics about the error in thoe variables.
R Squared values are
2009 May 16
1
maxLik pakage
Hi all;
I recently have been used 'maxLik' function for maximizing G2StNV178 function with gradient function gradlik; for receiving this goal, I write the following program; but I have been seen an error in calling gradient function;
The maxLik function can't enter gradlik function (definition of gradient function); I guess my mistake is in line ******** ,that the vector ‘h’ is
2004 Jun 25
2
Sweave: R code in self defined TeX-commands
Hi,
I need to produce a standard report for several variables in Sweave
and thus would need the possibility to define a TeX-command which includes
R-code like
\newcommand{\meansd}[1]{The mean is \Sexpr{mean(#1)} and the standard
deviation is \Sexpr{sd(#1)} .
}
and then just write
\meansd{age}
in the latex code to get the whole sentence.
The above does not work, since
2015 Jan 03
4
Potential cross-platform package building issue
I am using 32-bit R 3.1.2 on Windows 7.
I recently conducted an `R CMD check --as-cran` on a recently-developed
package and received only the 'New submission' note. Research on
StackOverflow and on R-devel suggested this could be ignored. I also used
devtools::build_win() and received no notes or warnings, other than the one
mentioned previously. Lastly, I conducted an `R CMD check` with
2011 Feb 02
2
Using MathJax in R's help system
Hi,
I am doing a small experiment to test if I can use
MathJax ( official site: http://www.mathjax.org )
in R's html help pages (i.e. options(help_type='html'))
and it seems working with some minor modifications.
The screenshot (rendered by Firefox 4.0 beta and with STIX fonts) of
the help page in html format with MathJax enabled is at the following
url:
2008 Mar 07
3
R-Logo in \LaTeX (Mag. Ferri Leberl)
Dear Mag. Ferri Leberl,
I'm using something like:
----------------------- tex.tex ---------------------------
\documentclass{article}
\usepackage{graphicx}
\usepackage{fancyvrb}
\newcommand{\Rlogo}{\protect\includegraphics[height=1.8ex,keepaspectratio]{Rlogo.pdf}}
\newcommand{\myinput}[1] {\begin{scriptsize}
\VerbatimInput[frame=single,label=#1]{#1}
\end{scriptsize}}
\title{The R logo,
2008 Mar 07
3
R-Logo in \LaTeX (Mag. Ferri Leberl)
Dear Mag. Ferri Leberl,
I'm using something like:
----------------------- tex.tex ---------------------------
\documentclass{article}
\usepackage{graphicx}
\usepackage{fancyvrb}
\newcommand{\Rlogo}{\protect\includegraphics[height=1.8ex,keepaspectratio]{Rlogo.pdf}}
\newcommand{\myinput}[1] {\begin{scriptsize}
\VerbatimInput[frame=single,label=#1]{#1}
\end{scriptsize}}
\title{The R logo,
2009 Oct 10
2
Possible bug in the Rd parser?
Dear list,
I got an automatic email complaining than some of my packages didn't
pass 'R CMD check' for R-2.10.0 alpha anymore. Both of them make use of
the "cases" LaTeX environment.
Inspecting the log outputs I got:
LaTeX errors when creating PDF version.
This typically indicates Rd problems.
LaTeX errors found:
! Misplaced alignment tab
2018 May 25
2
Rd parser throws error for user macros invoked with empty argument
While on the topic of Rd macro arguments, it seems that if a multiline argument is supplied, the lines after the first are silently ignored:
f <- tempfile()
mac6 <- "\\newcommand{\\mac6}{mac6: #1}"
cat(mac6, "\\mac6{2*3
2+2
sin(pi)
}\n", file = f)
rd <- tools::parse_Rd(f)
> rd
mac6: 2*3
---
Georgi Boshnakov
-----Original Message-----
From: Tomas Kalibera
2009 Aug 17
2
unnecessary braces?
the version 2 parser thinks I have unnecessary braces,
but I can't find any. False positive or am I missing
something? If a false positive, is there any way to
work around the warning?
* checking Rd files against version 2 parser ... WARNING
Warning: ./man/dbetabinom.Rd:32-34: Unnecessary braces at ?{p(x) = %
(C(N,x)*Beta(N-x+theta*(1-p),x+theta*p))/%
Beta(theta*(1-p),theta*p)}?
2006 Sep 25
3
Best use of LaTeX listings package for pretty printing R code
This is what I have been using. Does anyone have a better way? In
particular I would like to see letters in comment strings not stretched
so much. Thanks -Frank
\documentclass{article}
\usepackage{listings,relsize}
\lstloadlanguages{R}
\newcommand{\lil}[1]{\lstinline|#1|}
\begin{document}
\lstset{language=R,basicstyle=\smaller,commentstyle=\rmfamily\smaller,
showstringspaces=false,%
2005 Jul 19
1
translation with Rd.sty, Sweave and tex4th (PR#8016)
Full_Name: Paulo Ribeiro
Version: 2.1-1
OS: Debian Linux
Submission from: (NULL) (200.103.144.24)
I'm using Sweave with tex4th to generate xhtml documents
from documents created using Sweave which include \usepackage{Rd}
in the preamble
However there seems to be a problem with \Link defined in
Rd.sty, since this is also defined in tex4ht.sty
My workaround was to replace the lines with
2004 Jul 29
2
expression + paste + arguments + ...
dear R wizards: I would like to write a function that roughly places
the equivalent of the following latex text into the current plot:
\newcommand{ \placesigma }[4]{ \put(\#1,\#2){ \sigma_{A , #3} = #4 }
I cannot figure out how to do this. I know I have to use a function
that uses expressions in a text() invoke. But passing arguments and
nesting strings and expressions has so far not
2020 Apr 30
2
Use of MathJax (or something similar) in .Rd files
Thanks Gabor and Duncan! It works. For those interested, I added this to the beginning of the \details{} section:
\if{html}{\out{
<script id="MathJax-script" async
src="https://cdn.jsdelivr.net/npm/mathjax at 3/es5/tex-mml-chtml.js">
</script>
}}
And then I can use:
\if{html}{\out{\(B_{x(a,b)} = \int_0^x t^{a-1} (1-t)^{b-1} dt\)}}
or
2008 Jun 13
4
Sweave: looping over mixed R/LaTeX code
Dear guRus,
I would like to loop over a medium amount of Sweave code, including both R and LaTeX chunks. Is there any way to do so? As an illustration, can I create a .tex file like this using a loop within a .Rnw file, where the "1,2,3" comes from some iteration variable in R?
################################################
\documentclass{article}
\usepackage{Sweave}
\begin{document}
2011 Jun 20
1
Can mathematical formula be used in the help file of a R function or package?
Hi everyone,
I am writing help files for some R functions in an R package. I am wondering
if we can use the Latex mathematical formula when editing those *.Rd files
and then obtain a pdf manual with beautiful mathematical formula. I tried it
with the default R CMD check command but could not get the desired
mathematical formula. That is, $f(x)$ is not recognized as a math formulas.
I think the