Re: [Bioc-devel] LazyData in DESCRIPTION file

2020-05-01 Thread Vinh Tran
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

Re: [Bioc-devel] LazyData in DESCRIPTION file

2020-05-01 Thread Vinh Tran
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

Re: [Bioc-devel] LazyData in DESCRIPTION file

2020-05-01 Thread Vincent Carey
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

Re: [Bioc-devel] LazyData in DESCRIPTION file

2020-05-01 Thread Martin Morgan
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

Re: [Bioc-devel] LazyData in DESCRIPTION file

2020-05-01 Thread Kasper Daniel Hansen
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

Re: [Bioc-devel] LazyData in DESCRIPTION file

2020-05-01 Thread Vinh Tran
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

Re: [Bioc-devel] LazyData in DESCRIPTION file

2020-04-30 Thread Kasper Daniel Hansen
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

Re: [Bioc-devel] LazyData in DESCRIPTION file

2020-04-30 Thread Vinh Tran
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

Re: [Bioc-devel] LazyData in DESCRIPTION file

2020-04-30 Thread Kasper Daniel Hansen
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

Re: [Bioc-devel] LazyData in DESCRIPTION file

2020-04-29 Thread Vincent Carey
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