Hi,
I want to use a function as a ember function in my package which is already present in an existing package.
If I copy the code from that package and mention same name, it is producing some error. Though I have mention that where from the code is taken with proper formality but is is not working. Now when I change the function like functionName.XXX <- function( ) and put some alias{} name, it is working but when BiocCheck check is done it shows some kind of NOTE given below.
- NOTE: Consider clarifying how 2 object(s) are initialized. Maybe they are part of a data set loaded with data(), or perhaps part of an object referenced in with() or within().
Please help me to solve this
regards pijush
Read about "Depends, Imports, Suggests", here and here.
In your roxygen2 docs for your function:
#' @importFrom <packageName> <functionName>
. In the body of your function:packageName::functionName(args)
I think either one should work, no? i.e. either
#' @importFrom
and then one should be able to use the function without the package name pre-prended orpackageName::functionName()
I'd always put both. I certainly wouldn't use
packageName::functionName
without an@import
- to keep my warnings down inR CMD check
Thank you so much Friederike, russhh and zx8754 for your kind help.
If an answer was helpful, you should upvote it; if the answer resolved your question, you should mark it as accepted. You can accept more than one answer if they work.