if(interactive()) {
## Both calls work :
helppdf(Normal)
helppdf("NegBinomial")
} else if(.Platform$OS.type != "windows") { # batch mode (Windows often too slow for this)
od <- setwd(tempdir())
ff <- helppdf(Normal, viewer=NULL)
stopifnot(file.exists(ff)) ; print(ff)
setwd(od)# revert to previous dir.
}
Run the code above in your browser using DataLab