Re: [R-pkg-devel] creating a link to a vignette in a .Rd file

2018-11-19 Thread Fox, John
Dear Hadley, You're right -- my approach was flawed and the document doesn't open even when the file URL is hard-coded in the .Rd file. With that hint, I found the following solution: \href{../doc/partial-residuals.pdf}{partial-residuals vignette} This works and passes package

Re: [R-pkg-devel] creating a link to a vignette in a .Rd file

2018-11-19 Thread Hadley Wickham
On Mon, Nov 19, 2018 at 4:49 PM Fox, John wrote: > > Dear r-package-devel list members, > > I'd like to create a link to a package vignette from a help file in the same > package, for example to the "partial-residuals" vignette in the effects > package from effect.Rd. I'm able to generate a URL

Re: [R-pkg-devel] Effieciency drop in do.call?

2018-11-19 Thread peter dalgaard
A classical way of encountering this is x <- rnorm(1000) do.call("plot", list(x)) A way out is do.call("plot", list(quote(x))) -pd > On 19 Nov 2018, at 22:32 , peter dalgaard wrote: > > If it was just about args evaluation, then the slowness would be in the > list() call, no? > An

[R-pkg-devel] creating a link to a vignette in a .Rd file

2018-11-19 Thread Fox, John
Dear r-package-devel list members, I'd like to create a link to a package vignette from a help file in the same package, for example to the "partial-residuals" vignette in the effects package from effect.Rd. I'm able to generate a URL for the vignette as follows:

Re: [R-pkg-devel] Effieciency drop in do.call?

2018-11-19 Thread Paul Buerkner
Thanks! You are likely right that this was the problem. Actually, I was using a pattern of the form args <- nlist(a, b, c, ...) do.call(fun, args) where nlist() uses NSE to set names for unnamed arguments. As I was passing big model objects and data through multiple layers of do.call(), it is

Re: [R-pkg-devel] Effieciency drop in do.call?

2018-11-19 Thread peter dalgaard
If it was just about args evaluation, then the slowness would be in the list() call, no? An accidental deparse of a large structure could well be the culprit. -pd > On 19 Nov 2018, at 18:53 , Gabor Grothendieck wrote: > > The do.call version evaluates all arguments while the normal version >

Re: [R-pkg-devel] Dependencies in DESCRIPTION: Imports vs. Suggests

2018-11-19 Thread Joris Meys
Dear Paul, the correct form is something like: if( requireNamespace("abind", quietly = TRUE) ) { abind::foo() # do sth with abind} else { message("you need to install the pkg abind for this example") } In general you should avoid sending out code that installs packages. Some people work

Re: [R-pkg-devel] Dependencies in DESCRIPTION: Imports vs. Suggests

2018-11-19 Thread Paul Hargarten
Hi all, I am relatively new in creating R packages. I have created a new package called *"foo"* and submitted it to CRAN for review. I am wondering the difference between "Imports" and "Suggests" dependencies in DESCRIPTION file. According to my understanding, the "Imports" field contains all

Re: [R-pkg-devel] R CMD check halts on @example in shiny::runApp()

2018-11-19 Thread L Rutter
Hi Joris Meys: Thank you for your helpful response and confirmation that \dontrun{} is necessary for shiny examples. Lindsay On Mon, Nov 19, 2018 at 10:17 AM Joris Meys wrote: > > Hi Lindsay, > > this is normal and to be expected, as shiny blocks R and shifts focus to the > browser. This only

[R-pkg-devel] Effieciency drop in do.call?

2018-11-19 Thread Paul Buerkner
Hi all, today, I stumbled upon a puzzling (to me) problem apparently related to do.call() that resulted in an efficiency drop of multiple orders of magnitudes compared to just calling the function directly (multiple minutes as compared to one second). That is fun(a = a, b = b, c = c, ...) took

Re: [R-pkg-devel] R CMD check halts on @example in shiny::runApp()

2018-11-19 Thread Joris Meys
Hi Lindsay, this is normal and to be expected, as shiny blocks R and shifts focus to the browser. This only makes sense in interactive modus, as your app needs input from a user before it does anything. So for your shiny examples, you always have to use \dontrun{}. Cheers Joris On Mon, Nov 19,

[R-pkg-devel] R CMD check halts on @example in shiny::runApp()

2018-11-19 Thread L Rutter
Hello all: R CMD check does not complete for my package and halts at the line "* checking examples ..." I suspect the halting is due to @examples hanging in certain R/foo.R files, where shiny::runApp() is called for a shiny app located in a separate directory in this type of format: appDir <-

[R-pkg-devel] (no subject)

2018-11-19 Thread Oloyede Isiaq
I am developing a package in R, but I encountered the below problems, kindly assist. Updating relrisks documentation Loading relrisksWarning: The existing 'NAMESPACE' file was not generated by roxygen2, and will not be overwritten.-- Building