Using Roxygen2 to document functions in an R package (CC293)

Поділитися
Вставка
  • Опубліковано 1 лис 2024

КОМЕНТАРІ • 11

  • @PhilippusCesena
    @PhilippusCesena 3 місяці тому

    Great video as always!

  • @samlawrence4627
    @samlawrence4627 2 місяці тому

    Thank you for the video. I just have a question about the @examples section. When I preview the documentation file under the help tab in Rstudio, I see a link that says "Run examples." When I click this link, it takes me to a blank page that says "Example/ not found." When I look at other packages, I can click on this link, and it shows the output given by the examples. Is there something I have to do to get this link to work? Or does this happen after the package is submitted?

    • @Riffomonas
      @Riffomonas  2 місяці тому

      I think that only works on packages already on CRAN

    • @samlawrence4627
      @samlawrence4627 2 місяці тому

      @@Riffomonas Okay, thank you

  • @djangoworldwide7925
    @djangoworldwide7925 3 місяці тому

    I wonder how the process today might look if you're doing something like this with ChatGPT:
    Providing the function to chatgpt
    Uploading roxyegn documentation (optional)
    Asking it to write documentation with the important key headers, including examples.
    That way you can make sure your wording is the same across functions, as well as argument names.
    I mean, must provide some context but I bet it can spare a lot of time

    • @shadyamigo
      @shadyamigo 3 місяці тому +2

      I’ve used it for this very purpose. It’s very good and saves so much time

    • @Riffomonas
      @Riffomonas  3 місяці тому +1

      I'll make a deal with you and all of my other viewers... I promise that I will never intentionally use ChatGPT or its ilk to generate code, documentation, anything on my channel :)

    • @djangoworldwide7925
      @djangoworldwide7925 3 місяці тому

      I believe you, seeing how good you recall complex regex ;) ​@@Riffomonas

  • @djangoworldwide7925
    @djangoworldwide7925 3 місяці тому

    11:09 will instead of with. Not sure if you fixed it later
    23:45 should fix to @returns

    • @Riffomonas
      @Riffomonas  3 місяці тому +1

      Thanks! I think I got the @returns after editing the video :) It really doesn't matter if you use @return or @returns, but @returns is the new way of doing things.