tidyverse / stringr

A fresh approach to string manipulation in R

Home Page:https://stringr.tidyverse.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Adding a str_sub replacement in an R package, checking fails

fernandoroa opened this issue · comments

I am getting:

no visible global function definition for
  ‘str_sub<-’
Undefined global functions or variables:
  str_sub<-

When running

R CMD check --as-cran  package.tar.gz

I don't know how to fix it. I have tried all the answers found in several sites.

Problem arises having something like this in a function

str_sub(param) <- "  "

A workaround is to add

require(stringr)

or better:
use :: or requireNamespace()
inside the function with the replacement

str_sub(...) <- ""