Skip to content

Commit

Permalink
fix "no visible global function definition" NOTEs
Browse files Browse the repository at this point in the history
  • Loading branch information
daroczig committed Oct 28, 2014
1 parent 72139cf commit 1e01cad
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions R/S3.R
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
#' pander(x)
pander <- function(x = NULL, ...) {

if (isTRUE(panderOptions('knitr.auto.asis')) && isTRUE(getOption('knitr.in.progress')) && require(knitr, quietly = TRUE)) {
if (isTRUE(panderOptions('knitr.auto.asis')) && isTRUE(getOption('knitr.in.progress')) && requireNamespace('knitr', quietly = TRUE)) {

## grab stdout
stdout <- vector("character")
Expand All @@ -81,7 +81,7 @@ pander <- function(x = NULL, ...) {
sink()
sink(type = 'message')
close(con)
return(asis_output(paste(stdout, collapse = '\n')))
return(knitr::asis_output(paste(stdout, collapse = '\n')))
})
}

Expand Down
4 changes: 2 additions & 2 deletions R/helpers.R
Original file line number Diff line number Diff line change
Expand Up @@ -329,9 +329,9 @@ splitLine <- function(x, max.width = panderOptions('table.split.cells'), use.hyp
return(x)
if (is.infinite(max.width))
max.width <- .Machine$integer.max
if (use.hyphening && !require(koRpus))
if (use.hyphening && !requireNamespace('coRpus', quietly = TRUE))
use.hyphening <- FALSE
hyphen_f <- function(s)
hyphen(s, hyph.pattern="en.us", quiet = TRUE)@hyphen[1,2]
koRpus::hyphen(s, hyph.pattern="en.us", quiet = TRUE)@hyphen[1,2]
.Call('pander_splitLine_cpp', PACKAGE = 'pander', x, max.width, use.hyphening, hyphen_f)
}

0 comments on commit 1e01cad

Please sign in to comment.