Hi Matthew,
The conventional way to document a function that doesn't return a value is:

\value{nil}

in the .Rd file. In the arguments section, if your data frames are
named as "d1" and "d2",

\item{d1,d2}{Two data frames.}

Add any relevant information such as whether they must be conformable.

Jim

On Wed, Apr 28, 2021 at 3:11 PM csmatyi <csma...@protonmail.com> wrote:
>
> Hello all,
>
> Normally, when you write a function in R, it returns a value. That way it is 
> easy to write an .Rd file for this function.
>
> However, I have written a function that does no such thing. Rather, it takes 
> as input two data frames, and creates a figure. But doesn't return anything.
>
> In R package language, how do I write the examples in the .R file when I need 
> to define the input variable first as a data frame? I can't just write it as
>
> add(1,2) which returns 3.
>
> Any help?
>
> Thanks so much,
> Matthew
>
> Sent with [ProtonMail](https://protonmail.com) Secure Email.
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> r-package-de...@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to