Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

on cran submission #39

Open
12 tasks done
richardjtelford opened this issue Aug 12, 2024 · 6 comments
Open
12 tasks done

on cran submission #39

richardjtelford opened this issue Aug 12, 2024 · 6 comments

Comments

@richardjtelford
Copy link
Member

richardjtelford commented Aug 12, 2024

Several small issues.

  • rename vignette from my-vignette to something meaningful
  • give vignette a meaningful title (not vignette)
  • make the plots in the vignette larger
  • vignette references are broken. In the CITE available now?
  • put functions names in backticks so the show up as code
  • maybe turn warnings off on the last chunk
  • in the DESCRIPTION file, use person(given = c("Richard","James"), family = "Telford", ... ) rather than person(given = "Richard James", family = "Telford", ... ) so it is abbreviated correctly
  • split the description field of DESCRIPTION over multiple lines with indent (aim for a maximum of 80 characters per line, see e.g. https://github.com/tidyverse/ggplot2/blob/main/DESCRIPTION )
  • have you run styler and lintr on the package (run styler first so lintr has less to moan about
  • make a package help page (usethis::use_package_doc() will set this up. This can be similar to the readme.rmd (which cannot be seen from R)
  • do all the datasets and functions need to be exported
  • run devtools::release() to run through the process needed to make the submission. I recommend you make a script to run each step of the process (there are many steps!). Add the script to the .buildignore.
@jogaudard
Copy link
Collaborator

Lintr is unhappy about the number of arguments of flux_calc and flux_plot, I am not sure what to do with that

@jogaudard
Copy link
Collaborator

some functions do not need to be exported. I did not add the @export, so I am not sure why they are still being exported (see my comments on previous issue about exporting dataset)

@richardjtelford
Copy link
Member Author

try deleting the namespace file - then running devtools::document to regenerate it.

Sometimes unneeded lines in the namespace file don't get cleared out

@richardjtelford
Copy link
Member Author

When you have "see ggsave()" - you can make this a link to the code. See https://roxygen2.r-lib.org/articles/rd-formatting.html#links
Use the markdown syntax

@richardjtelford
Copy link
Member Author

flux_plot does have a lot of arguments. This makes it intimidating for the user.

All these arguments asking for column names. Are they necessary? I would either have these hard coded so the names are known in advance, or add attributes that the function can extract and use to find the column names (this is what I did in traitstrap)

For all the arguments that get passed to ggsave, you could put these into a list.

so

ggsave_args = list()

You can then use do.call() to run ggsave (or alternatives at https://stackoverflow.com/questions/9129673/passing-list-of-named-parameters-to-function)

@richardjtelford
Copy link
Member Author

flux_calc has a more managable number of arguments.

Why do you need the gas constant as an argument - isn't it constant?

As for flux_plot, columns should be an attribute of the data object so they don't need re-entering

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants