I am trying to build an R package. But now my function has used some function from package stringr
. Could anyone tell me how can I add stringr
in to my package? Thank you.
Asked
Active
Viewed 63 times
1 Answers
2
The function you have used should be added to roxygen documentation. For example, if you used the function stringr::str_extract()
, you can add-
#' @importFrom stringr str_extract()
And then run roxygen2::roxygenise()
and you should see this function added to your NAMESPACE
file. You can read about this in Hadley Wickham's (freely available book on how to make R packages): r-pkgs.had.co.nz/namespace.html
Or see this playlist: https://www.youtube.com/playlist?list=PLk3B5c8iCV-T4LM0mwEyWIunIunLyEjqM

Indrajeet Patil
- 4,673
- 2
- 20
- 51
-
thank you @indrajeet Patil. – Codezy Aug 26 '18 at 18:36