search for: dontrun

Displaying 20 results from an estimated 66 matches for "dontrun".

2014 Nov 26
6
testing dontrun examples
...fault? 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 then they are not tested. I could mark them \dontrun and then use example() but for this, in addition to run.dontrun=TRUE, I would need to specify all topics for a package, and I don't see how to do this, missing topic does not work. Wishlist: what I would really like is R CMD...
2014 Nov 27
1
testing dontrun examples
...h 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 then they are not tested. I could >> mark them \dontrun and then use example() but for this, in addition to >> run.dontrun=TRUE, I would need to specify all topics for a package, and >> I don't see how to do this, missing topic does not work. >> >> Wis...
2014 Nov 26
0
testing dontrun examples
...amples 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 then they are not tested. I could > mark them \dontrun and then use example() but for this, in addition to > run.dontrun=TRUE, I would need to specify all topics for a package, > and I don't see how to do this, missing topic does not work. > > Wishlist: what I wou...
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 ??????????????????????????????????????? Mark Heckmann Dipl. Wirt.-Ing. cand. Psych. Celler Stra?e 27 28205 Bremen Blog: www.markheckmann.de R-Blog: http://ryouready.wordpress.com
2010 Apr 12
2
source(,echo=T) doesn't echo final comments
...he 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 example section contains only code that is not to be run (\dontrun markup). Running the function example() (that itself calls source(,echo=TRUE)) on such a file will not display anything (because the code is commented out in the corersponding files in R-ex). Is that the desired behavior of example() or is there a workaround (i.e. to be able write help files with o...
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 function output mean anything (random number generation is not useful for understanding the function output). The CTFS datasets...
2009 Mar 05
1
documentation questions
...lear. looking at the pdf output (because it is nicest to read) I refer to it as "printed" because that's what I very often do for any substantial chunk of reading (>2 pages). Easier on my eyes. Talking only about the example section The question is what the result of \dontrun should be when producing a product that is meant to be read by a human, and I will assume that this is the primary target of the latex process. I oject to the comment that it adds. I would much prefer that it not add extraneous comments to my examples. I do want the items bracketed by \dontrun...
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 off from the their context. How do I turn these off? For printing \dontrun should be a no-op. Or at least I...
2011 Apr 28
1
Best Practices for submitting packages to CRAN
...s need to be released rather frequently (say, every 2 weeks). On the other hand, I know that humans have to operate CRAN and their time is limited. Therefore, any update will consume their time. 2. Is it necessary to put examples that take a considerable amount of time to run (> 1 hour) into a \dontrun block? Background: We have a really slow MCMC function. Some of the examples take ~1 hour to finish. If these examples are run each time the package is checked, it will significantly prolong the checking time. On the other hand, this check will ensure that all changes to the function do not corrupt...
2006 Apr 05
3
package docs: examples format
...lysis 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 time-consuming B() and C() run several times during package checking, taking far too long. I know that I can use \dontrun{B()} to show the sequence in the help without actually executing it each time. Is that the preferred approach, or is there something "nicer"? Ideally, I'd like to include one global example that covers all related functions, but I can't find a way to do that neatly (other than po...
2005 Oct 03
3
Problem building/checking library that requires input from user
Hi all, I've got a package i've written that i am trying to check, build, and install. This is my 1st time doing this, so apologies in advance... ;) The package that I've written requires input from the user. It needs to know sample sizes and then runs some calcs, (sample sizes are just integers), and it gets this info from the user as num_reps <- readline("How many reps
2015 Feb 09
2
R CMD check: Uses the superseded package: ‘doSNOW’
...NOW? 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, method="bootstrap", parallel=TRUE) > \dontrun{ci(roc2, method="bootstrap", parallel=TRUE)} > \dontshow{ci(roc2, method="bootstrap", parallel=TRUE, boot.n=20)} > stopCluster(cl) > } > #endif > #ifdef unix > if (require(doMC)) { > registerDoMC(2) > \dontrun{ci(roc2, method="bootstr...
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 with #, but that g...
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 ------------------------------------------------- Remko Duu...
2015 Feb 10
1
R CMD check: Uses the superseded package: ‘doSNOW’
...correct as I have the >> following example in an .Rd file: >>> #ifdef windows >>> if (require(doSNOW)) { >>> registerDoSNOW(cl <- makeCluster(2, type = "SOCK")) >>> ci(roc2, method="bootstrap", parallel=TRUE) >>> \dontrun{ci(roc2, method="bootstrap", parallel=TRUE)} >>> \dontshow{ci(roc2, method="bootstrap", parallel=TRUE, boot.n=20)} >>> stopCluster(cl) >>> } >>> #endif >>> #ifdef unix >>> if (require(doMC)) { >>> registe...
2005 Oct 03
0
Problem building/checking library that requires input fro m user
...ut > from user > > > Thanks, Dr Warnes & Prof Ripley... > > However, upon following the instructions below, I'm getting > syntax errors on > the line that has \dontshow...below is my code...I get the > same error if i > omit the first block and just try \dontrun... > > \dontshow{ > num_reps <- 10 > } > > \dontrun{ > num_reps <- readline(""How many reps do you have... ") > num_reps <- as.integer(num_reps) > } > > > could this have anything to do with it running on OS X 10.3 ?? (long > shot....
2015 Feb 10
0
R CMD check: Uses the superseded package: ‘doSNOW’
...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, method="bootstrap", parallel=TRUE) > > \dontrun{ci(roc2, method="bootstrap", parallel=TRUE)} > > \dontshow{ci(roc2, method="bootstrap", parallel=TRUE, boot.n=20)} > > stopCluster(cl) > > } > > #endif > > #ifdef unix > > if (require(doMC)) { > > registerDoMC(2) > >...
2010 Apr 22
1
Question of R CMD check
...figuration 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 re-installation. ######## * checking examples ... ERROR Running examples in 'stam-Ex.R' failed. ######## I used "\dontrun{} % enddontrun" in all the examples of my functions that should be no problem, i think. I checked my package before and did not find errors. I also browsed the checking results in 'stam-Ex.R'. It listed all the example codes in that file, something like this, cleanEx(); nameEx("...
2011 Mar 12
1
par(ask=TRUE) in R CMD check?
...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 2.12.0 and R Tools from that version, and R Tools seemed to supply all the mouse clicks required. However, before I "SVN Commit" to R-Forge, I felt a need to ask. Thanks, Spencer
2012 Aug 24
1
CRAN check error with no example?
...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 "\dontrun". I'm unable to replicate this error. I'm about to submit a new version of the fda package to CRAN, but I felt a need to ask about this first. Thanks, Spencer [[alternative HTML version deleted]]