similar to: testing dontrun examples

Displaying 20 results from an estimated 10000 matches similar to: "testing dontrun examples"

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
2014 Nov 26
0
testing dontrun examples
Hi, Paul: "if(!fda::CRAN())" runs code except with "R CMD check ?as-cran". I use it so CRAN checks skip examples that (a) need the Internet or (b) take too long for CRAN. Hope this helps. Spencer On 11/26/2014 10:45 AM, Paul Gilbert wrote: > Is there a good strategy for testing examples which should not be run > by default? For instance,
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 Dec 08
2
CRAN packages mis-using \donttest : falsy
Hi all, anyone has an idea how I could fix this? \donttest{ ## Set colors from colorspace package with a fallback col <- try(colorspace::rainbow_hcl(5), silent = TRUE) %||% rainbow(5) } The problem is that this makes R CMD check freak out (http://www.r-project.org/nosvn/R.check/r-devel-linux-x86_64-debian-clang/falsy-00check.html) if the colorspace package is not declared as a dependency.
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
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
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
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
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 Jan 08
4
unloadNamespace
In the documentation the closed thing I see to an explanation of this is that ?detach says "Unloading some namespaces has undesirable side effects" Can anyone explain why unloading tseries will load zoo? I don't think this behavior is specific to tseries, it's just an example. I realize one would not usually unload something that is not loaded, but I would expect it to do
2013 Aug 28
2
‘:::’ call
I have a package (TSdbi) which provides end user functions that I export, and several utilities for plugin packages (e.g. TSMySQL) that I do not export because I do not intend them to be exposed to end users. I call these from the plugin packages using TSdbi::: but that now produces a note in the checks: * checking dependencies in R code ... NOTE Namespace imported from by a ?:::? call:
2009 Mar 05
1
documentation questions
You've answered my question 2 about why the manual was in odd order > R CMD check was more of a check of the latex version of the files, not > the final manual. I was looking at the result of R CMD check, and it was in random order (perhaps file date?), not just a different collation choice. Very odd. I will cease worrying about what I might have "done wrong". I omitted the
2019 Feb 19
4
code for sum function
The algorithm does make a differece. You can use Kahan's summation algorithm (https://en.wikipedia.org/wiki/Kahan_summation_algorithm) to reduce the error compared to the naive summation algorithm. E.g., in R code: naiveSum <- function(x) { s <- 0.0 for(xi in x) s <- s + xi s } kahanSum <- function (x) { s <- 0.0 c <- 0.0 # running compensation for lost
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
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
2002 Feb 11
1
Code in Rd help files other than in \examples{}
I am stumped in determining the proper syntax for including displayed S code within an R .Rd documentation file, in places other than \examples{}. I have tried \code{ line 1 line 2 } but the lines get run together. When I terminate the lines by \cr, the "\cr" actually appears in the resulting html file. This is all inside a customized \section{}. On a related note, what is
2020 Jan 28
4
matplot.Date & matplot.POSIXct
????? Thanks for the reply. On 2020-01-27 19:56, Abby Spurdle wrote: > Maybe I'm missing something really obvious here, but I was unable to > create a matrix out of POSIXct object(s). > Perhaps that deserves a separate discussion...? ????? Can you provide an example? ????? The standard matplot application that concerns me is with matplot(x, y, ...) where x has class Date or
2012 Dec 12
3
SystemRequirements’ field
Am I correct in thinking that the ?SystemRequirements? field in a package DESCRIPTION file is purely descriptive, there are no standard elements that can be extracted by parsing it and used automatically? This field does not seem to be widely used, even for some obvious cases like backend database driver requirements, perl, perl modules, etc. It might help to have a list of possibilities. Some
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