similar to: Line breaks in mathematical formulae in Rd files

Displaying 20 results from an estimated 4000 matches similar to: "Line breaks in mathematical formulae in Rd files"

2008 Nov 14
1
Line breaks in mathematical formulae in Rd files (PR#13287)
Hi, This is a problem about writing R documentation (R-exts 2.6). The command "\deqn" defined in "Rd.sty" is: \newcommand{\deqn}[2]{\[#1\]} which will put mathematical formulae in the "displaymath" environment; that means line breaks are not allowed (or will not be shown) in formulae, but sometimes we do need multiple lines of formulae. One solution is to write
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
2013 Oct 21
2
png(type='cairo'): point symbols without boarders are not anti-aliased?
Hi, It seems that anti-aliasing in png(type = 'cairo') is not well supported for the point symbols without boarders, e.g. pch = 16. The Cairo package works well, though. You can compare png() with CairoPNG(): png(): http://i.imgur.com/8niB3jX.png CairoPNG(): http://i.imgur.com/FZBJOxm.png f = function(dev, ..., main = '') { dev(...) plot(c(1, 2, 1, 2), c(1, 1, 2, 2),
2013 Jan 04
1
Bug in R CMD check for \ in Rd?
Hi, I have a function knit_expand() and its source/Rd are below: https://github.com/yihui/knitr/blob/master/R/template.R#L43-L44 https://github.com/yihui/knitr/blob/master/man/knit_expand.Rd When I run R CMD check on the package I get this warning (with both R 2.15.2 and R-devel): * checking for code/documentation mismatches ... WARNING Codoc mismatches from documentation object
2010 Nov 25
3
Go (back) from Rd to roxygen
Hi all, Since roxygen is a great help to document R packages, I am wondering if there exists an approach to go back from the raw Rd files to roxygen-documentation? E.g. turn "\author{Somebody}" into "@author Somebody". This sounds ridiculous, but I believe it helps in the long term for me to maintain R packages. Thanks! Regards, Yihui -- Yihui Xie <xieyihui at
2009 Jun 20
2
Special characters in Rd example section will cause errors
Hi (Duncan?), The other day I noticed some characters will cause errors in R CMD CHECK because of parse_Rd(), and AFAIK, these chars include '%', '{' and '}'. For example, note the comments in the example section: %~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~% \name{testfun} \Rdversion{1.1} \alias{testfun} \title{ A Test } \description{ A test } \usage{ testfun() } \value{ NULL }
2011 Oct 17
1
What does \Sexpr[results=rd]{} exactly mean in Rd?
Hi, I have spent a few hours on the R-exts manual and the documentation of parse_Rd() (as well as the PDF document in the references), but I still have not figured out what results=rd means. I thought I could use an R code fragment to create an Rd fragment dynamically. Here is an example, in which I was expected the output to be a describe list <DL> in HTML, but it turns out not to be true.
2009 May 16
1
ggplot2: annotating plot with mathematical formulae
Hi, Is there a way of annotating a ggplot plot with mathematical formulae? I can do geom_text(aes(label="some text", ... but I can't do geom_text(aes(label=expression(x^{n-1}), ... It gives the error Error: geom_text requires the following missing aesthetics: label Is there a convenient equivalent? Cheers, Paul
2009 Sep 22
3
R PNG graph width limitation
Hi folks, I am trying to do a clustering and generate a long dendrogram in R on Linux server: ========= data<-read.table(file="mean_ratio.txt.noheader",row.names=1,sep="\t",quote="\"") hc<-hclust(dist(data),"ward") png(file="mean_ratio.txt.noheader.ward.png",bg="white",pointsize=8,width=32767,height=1536) plot(hc,hang=-1)
2011 Aug 24
1
silently testing for data from another package for .Rd examples
In an .Rd example for a package, I want to use data from another package, but avoid loading the entire package and avoid errors/warnings if that other package is not available. If I don't care about loading the other package, I can just do: if (require("ElemStatLearn", quietly=TRUE)) { data(prostate) # rest of example } I'd rather just be able to do something like:
2010 Mar 12
3
rmaxwell in C
Hi R useRs: How can I generate a random sample from Maxwell Distribution in C language? Since I know the function rmaxwell {VGAM}, I tried the function r2c {r2c}. But I still cannot find the source code. Thanks for your kind help. RegaRds, 2010-03-12 Randel [[alternative HTML version deleted]]
2011 Jun 05
1
tag \href not recognised in rd doc
Hi, I have a trouble trying to use \href in a rd doc. See example below: \references{ \href{http://www.ncbi.nlm.nih.gov/pmc/articles/PMC2702787/}{Vaniscotte A., Pleydell D., Raoul F., Quere J.P., Coeurdassier M., Delattre P., Li T., Qian W., Takahashi K., Weidmann J.C., Qiu J., Giraudoux P. 2009 Modelling and spatial discrimination of small mammal assemblages: an example from western
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:
2009 Nov 07
2
Rpad and R 2.10.0
I have problems with Rpad and R 2.10.0 (Windows XP and Windows 7, browser is Firefox) Just starting Rpad by library(Rpad) Rpad() opens the browser and displays the .html files and the .Rpad files in my home directory, but these files do not have links and are not clickable. Doing the same in R 2.9.2 gives clickable links in the browser. Furthermore, in both cases an empty graphics window
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
2011 Aug 23
5
Easier ways to create .Rd files?
R-helpers: Are there any ways to auto-generate R-friendly (e.g. will pass a compilation check) .Rd files given a set of .R code? How about GUIs that help properly format the .Rd files? Thanks! I want a basic set of .Rd files that I can update as I go, but as with most things my documentation typically lags behind my coding by a few days. --j -- Jonathan A. Greenberg, PhD Assistant Project
2009 Nov 09
1
deparse() and the 'else' statement
Hi all, It is recommended in ?'if' that we use 'else' right after '}' instead of starting a new line, but I noticed deparse() will separate '}' and 'else' when the 'if...else' clause is used inside {...} (e.g. function body). Here is an example: ## if/else inside {} > cat(deparse(parse(text='function(){if (TRUE) {1} else {2}}')),
2010 Mar 11
1
parse an HTML page with verbose error message (using XML)
I'm using the function htmlParse() in the XML package, and I need a little bit help on error handling while parsing an HTML page. So far I can use either the default way: # error = xmlErrorCumulator(), by default library(XML) doc = htmlParse("http://www.public.iastate.edu/~pdixon/stat500/") # the error message is: # htmlParseStartTag: invalid element name or the tryCatch()
2008 Oct 03
1
formula form of coxph
Dear R user, I got a question when using the coxph function. I have 5 covariates x1, x2, x3, x4, x5 and I want to write a function so that when given an indicator, e.g., c(1,3,5), I can fit the model as model=coxph(Surv(time, status)~x1+x3+x5). Any idea to play around the form of formula? Thank you very much! Xing Yuan University of Pittsburgh [[alternative HTML version deleted]]
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