similar to: documentation questions

Displaying 20 results from an estimated 1000 matches similar to: "documentation questions"

2009 Mar 05
2
Two documentation questions
1. I often like to put bits of the output into the manual pages. (We can have a discussion of the value of this elsewhere -- I think it is sometimes a good thing.) In R I need to surround these with \dontrun{} for the sake of the tester, which is fine. But the printed output contains ## Not run and ## End (not run) comments, which defeats the purpose of the lines by breaking them
2014 Nov 26
6
testing dontrun examples
Is there a good strategy for testing examples which should not be run by default? For instance, I have examples which get data from the Internet. If I wrap them in try() then they can be skipped if the Internet is not available, but may not be tested in cases when I would like to know about the failure. (Not to mention that the example syntax is ugly.) If I mark them \dontrun or \donttest
2004 Jun 15
2
To run or not to run examples, CTFS package
Hi again; I have placed many examples in the CTFS Rd pages because my audience really really likes lots of examples in order to understand the options available in a functions. At this time I have set them all to \dontrun{}. however, this isn't because the example command line with its function and options won't work, but rather that CTFS specific datasets must exist to have the
2005 Aug 31
2
R CMD check example problem (PR#8113)
[Automatic forwarding from R-bugs failed. This message has been manually forwarded.] Hi all! I'm trying to add Thomas Lumley's defmacro() function Lumley T. "Programmer's Niche: Macros in {R}", R News, 2001, Vol 1, No. 3, pp 11--13, \url{http://CRAN.R-project.org/doc/Rnews/} to the gtools package (provided that Thomas gives his OK). And I've encountered an error in
2010 Apr 12
2
source(,echo=T) doesn't echo final comments
Hi, source(file,echo=T) will not echo the last comment in "file" if it is the last line in the file. For instance, when sourcing a file containing the following lines #comment 1 a<-1 #comment 2 R will echo > #comment 1 > a<-1 What is the solution to have R echo all of the comment lines? Specific context: This problem arises e.g. in the context of help files (.Rd) whose
2010 Nov 20
1
Roxygen examples in DONTRUN mode - how?
Dear list, I have just started to use roxygen and cannot find out how to specify NOT RUN examples. I know that to include R code examples works via the @examples tag followed by the code. Without roxygen, if I want R code not to be run when processing the .Rd files I would include the \dontrun tag \examples{\dontrun{ ... some example R code} } How can I achieve this using roxygen? Thanks Mark
2014 Nov 27
1
testing dontrun examples
On 14-11-26 05:49 PM, Duncan Murdoch wrote: > On 26/11/2014, 1:45 PM, Paul Gilbert wrote: >> Is there a good strategy for testing examples which should not be run by >> default? For instance, I have examples which get data from the Internet. >> If I wrap them in try() then they can be skipped if the Internet is not >> available, but may not be tested in cases when I
2015 Feb 09
2
R CMD check: Uses the superseded package: ‘doSNOW’
Dear list, When I run an R CMD check --as-cran on my package (pROC) I get the following note: > Uses the superseded package: ?doSNOW? The fact that it uses the doSNOW package is correct as I have the following example in an .Rd file: > #ifdef windows > if (require(doSNOW)) { > registerDoSNOW(cl <- makeCluster(2, type = "SOCK")) > ci(roc2,
2011 Apr 28
1
Best Practices for submitting packages to CRAN
Dear all, I (and a colleague) have been working on our first package (for fitting a certain type of cognitive models: http://www.psychologie.uni-freiburg.de/Members/singmann/R/mptinr) for quite a while now and have the feeling, that it is "good to go". That is, we want to submit it to CRAN. However, I still have two questions before doing so and would appreciate any comments. 1. How
2006 Apr 05
3
package docs: examples format
Hello, The package I'm finishing up contains a series of functions intended to be run one after the other, as in: do data-prep using A() run complicated, slow, analysis B() do complicated, slow additional analysis C() plot the results with D() and E() Now, in the documentation for each of those functions, I put the entire sequence to illustrate the proper sequence. But this means that the
2010 Jul 16
4
how to comment off sections
Hello, Is there an way to easy comment of sections of code? I was thinking something along the lines of \dontrun{ codeline 1 .... codeline k } but that could be used in regular script files. When I am still working on a script, I often want to being using what is done, but I would like the parts I am still working on not to be run when I use source() on the file. I can set everything off
2009 Feb 13
2
Running examples failed (but there are none).
Dear R-helpers, making a package (windowsXP), that includes a bunch of functions, but none have examples (all example code is within \dontrun{} blocks). I do R CMD check Maeswrap, all bits get OK-ed, except: "Running examples in 'Maeswrap-Ex.R' failed." When I run the 'Maeswrap-Ex.R' file myself, there are no problems. Any pointers? thanks Remko
2015 Feb 10
1
R CMD check: Uses the superseded package: ‘doSNOW’
Oh, I completely missed that one. It's very neat as it seems to work both on Windows and Unix. Thanks! Xavier On 10/02/15 10:52, Martyn Plummer wrote: > The CRAN package snow is superseded by the parallel package which is > distributed with R since version 2.14.0. Here are the release notes > > \item There is a new package \pkg{parallel}. > > It incorporates (slightly
2017 Jul 12
1
devtools::check "hangs"
Hi, checking my package with check from devtools leads to the output Functions with \usage entries need to have the appropriate \alias entries, and all their arguments documented. The \usage entries must correspond to syntactically valid R code. See chapter ?Writing R documentation files? in the ?Writing R Extensions? manual. * checking Rd contents ... OK * checking for unstated dependencies in
2010 Apr 22
1
Question of R CMD check
Hi all, Today, i just installed the newest R version 2.10.1 and other necessary tools for building R package under windows,e.g. Rtools, perl. All are the newest version. After the correct configuration under windows (configuration should be correct), i use it to re-check my old package. I found the following prolem when checking EXAMPLEs in each function, which did not exist before this
2011 Mar 12
1
par(ask=TRUE) in R CMD check?
Hello: What happens in the auto-checks on R-Forge and CRAN with code using par(ask=TRUE)? Is this routine, or can it create problems? The fda package uses ask=TRUE to provide the user with a way to examine a group of plots. In the past, I've marked those tests in \examples with \dontrun. However, I wonder if that is necessary. I tried it on Windows using R
2012 Aug 24
1
CRAN check error with no example?
Hello, All: The CRAN checks for the "fda" package includes one error: The error most likely occurred in ... file.copy2 ... Error: unprotect_ptr: pointer not found Execution halted (http://www.r-project.org/nosvn/R.check/r-devel-linux-x86_64-debian/fda-00check.html) The help page for "file.copy2" includes "\examples" with everything wrapped in
2012 Jun 10
1
Convert "\" to "/"?
Hello, All: I have for years copied an address like "C:\Program Files\R\R-2.15.0\library\MASS\scripts" from Windows Explorer into R, then manually replaced "\" with "/". I have a function to automate this added to the development version of "sos". However, it generates a warning in "R CMD check" ("parse error: unexpected
2018 Dec 17
1
Function I mean not to export keeps being documented in a manual?
I am developing an R package which has a function I decided not to export. I believe the roxygen information states that the function is not going to be exported, yet I still see the function in the manual PDF (as generated in command line via `CMD Rd2pdf package_dir`). What is wrong with my preamble that the function is still being documented in a manual? #' Generates plots for demo of
2011 Nov 24
3
How to deal with package conflicts
In my genridge package, I define a function ridge() for ridge regression, creating objects of class 'ridge' that I intend to enhance. In a documentation example, I want to use some functions from the car package. However, that package requires survival, which also includes a ridge() function, for coxph models. So, once I require(car) my ridge() function is masked, which means I have to