Re: [R-pkg-devel] Error in re-building vignettes (SOLVED)
Hi again, today I INSTALLED R-devel (2017-12-05 r73849) and updated all packages > update.packages(checkBuilt = TRUE) and rebuilt eha_2.5.1 and now all checks passed! Maybe the update of packages was necessary. On its way to CRAN now. Göran On 2017-12-05 21:51, Göran Broström wrote: Hi, I am checking my eha package with R-3.4.3: goran@M6800:~/R$ R CMD check --as-cran eha_2.5.1.tar.gz which results in * DONE Status: OK Fine, but with R-devel (2017-12-04 r73829) goran@M6800:~/R$ ~/src/R-devel/bin/R CMD check --as-cran eha_2.5.1.tar.gz . * checking re-building of vignette outputs ... WARNING Error in re-building vignettes: ... *** caught segfault *** address 0x1, cause 'memory not mapped' Traceback: 1: .Call(C_stri_locate_all_regex, str, pattern, omit_no_match, opts_regex) 2: stri_locate_all_regex(string, pattern, omit_no_match = TRUE, opts_regex = opts) 3: stringr::str_locate_all(input, inline.code) 4: parse_inline(g, patterns) 5: FUN(X[[i]], ...) 6: lapply(groups, function(g) { block = grepl(chunk.begin, g[1]) if (!set.preamble && !parent_mode()) { return(if (block) "" else g) } if (block) { n = length(g) if (n >= 2 && grepl(chunk.end, g[n])) g = g[-n] g = strip_block(g, patterns$chunk.code) params.src = if (group_pattern(chunk.begin)) { stringr::str_trim(gsub(chunk.begin, "\\1", g[1])) } else "" parse_block(g[-1], g[1], params.src) } else parse_inline(g, patterns)}) 7: split_file(lines = text) 8: process_file(text, output) 9: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet, encoding = encoding) 10: rmarkdown::render(file, encoding = encoding, quiet = quiet, envir = globalenv()) 11: vweave_rmarkdown(...) 12: engine$weave(file, quiet = quiet, encoding = enc) 13: doTryCatch(return(expr), name, parentenv, handler) 14: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 15: tryCatchList(expr, classes, parentenv, handlers) 16: tryCatch({ engine$weave(file, quiet = quiet, encoding = enc) setwd(startdir) find_vignette_product(name, by = "weave", engine = engine)}, error = function(e) { stop(gettextf("processing vignette '%s' failed with diagnostics:\n%s", file, conditionMessage(e)), domain = NA, call. = FALSE)}) 17: buildVignettes(dir = "/home/goran/R/eha.Rcheck/vign_test/eha") An irrecoverable exception occurred. R is aborting now ... Segmentation fault (core dumped) * checking PDF version of manual ... OK * DONE Status: 1 WARNING, 2 NOTEs So, can I send this version of eha to CRAN? Göran Broström __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
Re: [R-pkg-devel] (no subject)
That's the issue. My examples are inside a \dontrun{} block 2017-12-05 18:47 GMT+01:00 Iñaki Úcar : > 2017-12-05 18:38 GMT+01:00 Uwe Ligges : > > > > > > On 05.12.2017 18:35, Iñaki Úcar wrote: > >> > >> 2017-12-05 10:04 GMT+01:00 Jose Manuel Vera >: > >>> > >>> Hi all > >>> > >>> Submitted my package to CRAN but I got some notes I cannot understand. > >>> > >>> First NOTE is regarding possibly mis-spelled words in DESCRIPTION. > Taken > >>> into account that these are not mispelled words (catastro is a spanish > >>> word > >>> for "Property registry office") I leave it for now. > >>> > >>>catastro (18:64) > >>>kml (18:39) > >>>spanish (12:70, 17:37) > >> > >> > >> You can ignore this if they are false positives. However, you may > >> consider using \emph{catastro}, > > > > > > > > No, not in Title nor Description fields. > > Correct, I was thinking about Rd files. Sorry, I skimmed through and > didn't read DESCRIPTION, despite being quite big. > > Iñaki > [[alternative HTML version deleted]] __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
Re: [R-pkg-devel] Error in re-building vignettes (SOLVED)
On 6 December 2017 at 11:40, Göran Broström wrote: | Hi again, | | today I INSTALLED R-devel (2017-12-05 r73849) and updated all packages | | > update.packages(checkBuilt = TRUE) | | and rebuilt eha_2.5.1 and now all checks passed! Maybe the update of | packages was necessary. Very much so, and R Core told us about it some time ago when the 'big recent changes' (ALTREP etc) landed in R-devel. | On its way to CRAN now. Glad you have it squared away. Dirk -- http://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
[R-pkg-devel] Conditionally register method with generic in other package
I have a feeling I know the answer to this question, but I'm asking with the hope that I learn something new. Package A defines a S3 generic function, "foo()". Package B defines a S3 class "bar", and a foo.bar() method. This method is not strictly necessary for the package to function, and package A has many dependencies. To avoid excessive dependencies, I would like to only register foo.bar() if package A is installed at the time package B is installed. If package A is installed after package B, then warn the user when package B is loaded and/or attached, so they can re-install A and have foo.bar() registered correctly. I could figure out a way to do this manually, but doubt it would be CRAN-approved. What is the recommended way to handle this situation? I've received one suggestion to split B into 2 packages: one without the method, and one with. Are there other alternatives? Thanks, Josh -- Joshua Ulrich | about.me/joshuaulrich FOSS Trading | www.fosstrading.com R/Finance 2018 | www.rinfinance.com __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
Re: [R-pkg-devel] Conditionally register method with generic in other package
> On Dec 6, 2017, at 07:45, Joshua Ulrich wrote: > > To avoid excessive dependencies, I would like to only register > foo.bar() if package A is installed at the time package B is > installed. If package A is installed after package B, then warn the > user when package B is loaded and/or attached, so they can re-install > A and have foo.bar() registered correctly. One simple solution would be to wrap the instantiation of foo.bar in a require test: if (require(A)) { foo.bar <- function(...) { print("To be or not to be") } } else { message("To use the foo.bar function, please install package A.") } Thanks, Bill __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
Re: [R-pkg-devel] Conditionally register method with generic in other package
On 06/12/2017 8:44 AM, Bill Denney wrote: On Dec 6, 2017, at 07:45, Joshua Ulrich wrote: To avoid excessive dependencies, I would like to only register foo.bar() if package A is installed at the time package B is installed. If package A is installed after package B, then warn the user when package B is loaded and/or attached, so they can re-install A and have foo.bar() registered correctly. One simple solution would be to wrap the instantiation of foo.bar in a require test: if (require(A)) { foo.bar <- function(...) { print("To be or not to be") } } else { message("To use the foo.bar function, please install package A.") } It's usually better to use requireNamespace("A") instead of require("A") (and the quotes are needed in requireNamespace(), but optional in require()). That tries to load the package, but doesn't mess with the search list. But that'll likely cause warnings, unless the same condition is used in the NAMESPACE file where there should be an entry S3method(foo, bar) The thing is, I'm not sure if if (requireNamespace("A")) S3method(foo, bar) is legal in a NAMESPACE file. Duncan Murdoch __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel