-
Notifications
You must be signed in to change notification settings - Fork 34
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
Added R packaging tutorial #52
base: main
Are you sure you want to change the base?
Conversation
…d vignettes bit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks @ben18785 ! some suggested changes below. Also, would it be possible to add some challenge directives to indicate things that the student should do and tick off? this allows us to see progress through any given course
name: "Aims and workflows" | ||
teaching: 10 | ||
dependsOn: [ | ||
technology_and_tooling.r_packaging.setup |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could we please put this within the "packaging_dependency_management" course as a separate stream on R packaging? we already have C++ and python packaging in there
dependsOn: [ | ||
technology_and_tooling.r_packaging.setup | ||
] | ||
tags: [rpackaging] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
think the tag should be "R" to indicate this is the R stream of the packaging course
|
||
## Create package outline | ||
|
||
We are now going to create the skeleton of our package within your newly created directory. Fortunately, much of this process is automated, minimising the effort required by you! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
was there meant to be something before this on creating the directory?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
never mind, I found it :)
- make yourself the author; if you don’t have an ORCID, you can omit the `comment = ...` portion | ||
- add some descriptive text to the `Title` and `Description` fields | ||
|
||
Add an MIT license (see [course x](xx) for an intro to software licenses) via `use_mit_license()` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
link here looks like it needs to be filled in
|
||
## Add descriptive info for your package | ||
|
||
Open up the `DESCRIPTION` file: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there a link to an official description of this file? eg. https://r-pkgs.org/description.html
|
||
Note that we have used `dplyr::tibble` rather than `tibble` to indicate that we are wanting to access a function that is amongst the exported variables of the `dplyr` package. In practice, when developing an R package, it should be your default behaviour to use `::` to access functions belonging to a specific package. This adds clarity to your code and helps you (and anyone else developing a package after you) to keep track of exactly which functions are being used from which packages. | ||
|
||
Create documentation for the above function. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how? docstring or R equivilent?
--- | ||
name: "Setup" | ||
dependsOn: [ | ||
technology_and_tooling.r_packaging.index |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this depends on should just be empty
technology_and_tooling.r_packaging.index |
As per #48