Single .Rd File for Several ?help Queries

I am writing a package for personal use that utilizes several small internal datasets. I want to write a ?help .Rd for each. Some of the internal datasets are transformations of each other and I want several ?dataset1 ?dataset2 calls to point to the same .Rd file.

I am using roxygen2 blocks in the /R/data.R directory.

What I have now:

    #' A description of a dataset.
    #'
    #'
    #' @format This is how my dataset is formatted. Blah blah blah.
    #' 
    #' \code{dataset_transformation_1} this transformation is neato
    #' 
    "dataset_transformation_1"

    #' A description of a dataset.
    #'
    #'
    #' @format This is how my dataset is formatted. Blah blah blah.
    #' 
    #' \code{dataset_transformation_2} this one is pretty if you plot it
    #' 
    "dataset_transformation_2"

    #' A description of a dataset.
    #'
    #'
    #' @format This is how my dataset is formatted. Blah blah blah.
    #' 
    #' \code{dataset_transformation_3} something something dark side
    #' 
    "dataset_transformation_3"

Similar to what I want, but this doesn't work:

    #' A description of several datasets.
    #'
    #'
    #' @format This is how my dataset is formatted. Blah blah blah.
    #' 
    #' \code{dataset_transformation_1} this transformation is neato
    #' \code{dataset_transformation_2} this one is pretty if you plot it
    #' \code{dataset_transformation_3} something something dark side
    #' 
    "dataset_transformation_1"
    "dataset_transformation_2"
    "dataset_transformation_3"

I want it such that I can type ?dataset_transformation_1 or ?dataset_transformation_2 into the console and get the same help file for both. Is this possible and how do I do it?

Resolved this by using: https://stackoverflow.com/questions/57390342/use-roxygen2-to-document-multiple-datasets-in-a-single-documentation-object

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.