Dear all,
So the final solution for this issue is:
- using @name to define the name of the data set, instead of writing it under
the rd comment block (solved the warning of R CMD Check: "Variables with usage
in documentation but not in code")
- using @docType data (thanks Vincent) to avoid the
Dear all,
Following Martin's guide, I added @name to the rd comment and replace the
dataset name by NULL, the warning went away.
Previously, it was:
#' An example of a final processed & filtered phylogenetic profile.
#’ …
#’ …
"finalProcessedProfile"
Now, it becomes
#' An example of a final pro
does
@docType data
help here?
On Fri, May 1, 2020 at 8:52 AM Martin Morgan
wrote:
> One can write arbitrary documentation pages in roxygen2; the page doesn’t
> have to rely on automatic generation from data objects. For instance
> filling in the following template would get you (close to) what
One can write arbitrary documentation pages in roxygen2; the page doesn’t have
to rely on automatic generation from data objects. For instance filling in the
following template would get you (close to) what you want
#' @rdname
#' @name
#' @description
#' @usage
#' @details
#' @return
#' @example
Your diagnose sounds reasonable to me. I don't use roxygen2 myself, so I
can't really help here (and this is one of several reasons: it adds another
layer of potential problems to the documentation process). Perhaps someone
who uses roxygen2 can comment? Or perhaps they (roxygen2 developers) have a
Dear Kasper,
I think the issue was not with the loading data in the examples of the
functions, but with the Rd documents of the datasets themselves, where it says
“usage{data_name}” instead of “usage{data(data_name)}”. These Rd documents are
however automatically created using roxygen2. I still
This seems really weird, and I don't think you should be using lazyData to
get a message to disappear. Is there a GitHub page where we can browse the
code and do you have the full output of R CMD check somewhere?
On Thu, Apr 30, 2020 at 9:05 AM Vinh Tran wrote:
> Dear Kasper,
>
> Many thanks fo
Dear Kasper,
Many thanks for your reply. Yes, I am using data() to load the data. However,
the problem is, when I checked my package using CMD Check, it threw me the
warning that I am using that data only in the example but not in code. I see
the disadvantages of LazyData, but I just want to kn
If you don't have lazy data on, you should be able to load the data by
using data(). Let us say you example data is called expData.
With lazy data
print(expData)
Without lazy data you need explicit loading
data(expData)
print(expData)
For the purpose of examples, there is also a user-leve
I see this is guideline 7 at
https://bioconductor.org/developers/package-guidelines/
I have used LazyData: TRUE so that [pkgname]::[entity] can be used instead
of data(). The
claim that it is "rarely a good thing" and slows down package loading can
be weighed against
convenience. I am not sure y
10 matches
Mail list logo