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

Added R packaging tutorial #52

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

ben18785
Copy link

@ben18785 ben18785 commented Jan 8, 2024

As per #48

Copy link
Collaborator

@martinjrobins martinjrobins left a 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
Copy link
Collaborator

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]
Copy link
Collaborator

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!
Copy link
Collaborator

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?

Copy link
Collaborator

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()`
Copy link
Collaborator

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:
Copy link
Collaborator

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.
Copy link
Collaborator

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
Copy link
Collaborator

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

Suggested change
technology_and_tooling.r_packaging.index

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

Successfully merging this pull request may close these issues.

2 participants