swcarpentry / r-novice-inflammation

Programming with R
http://swcarpentry.github.io/r-novice-inflammation/
Other
160 stars 394 forks source link

Formatting Typo (?) in "Making Packages in R" Episode #586

Closed kellychang4 closed 1 week ago

kellychang4 commented 1 year ago

In the below section:

An R package requires four components:

  • a DESCRIPTION file with metadata about the package
  • an R directory with the code
  • a man directory with documentation (we will create this automatically)
  • a NAMESPACE file listing user-level functions in the package (we will also create this automatically)

It might be nicer to have an ordered list instead of an unordered list. This section was followed by a note (?) with an additional asterisk (*). Was this meant to be in bold, italics, or another bullet point?

*There are other optional components. rOpenSci community has written a science-focused guidebook for package development, while the “R packages” book contains all the fundamental information.

Bisaloo commented 1 year ago

Thanks for the report!

This section was followed by a note (?) with an additional asterisk (*). Was this meant to be in bold, italics, or another bullet point?

Looking through the git history with git blame, it appears that the note was additionally intended to be in italics but the closing asterisk was lost in https://github.com/swcarpentry/r-novice-inflammation/commit/87c47563e4424b685f7bfc9166617864176a1a09. Could you submit a pull request to fix it please?

It might be nicer to have an ordered list instead of an unordered list.

I'm less sure about this part. I'm afraid an ordered list might give the feeling of a chronology or a hierarchy, which is not the case here. This list could be in a different order and still be completely correct. What do you think?

kellychang4 commented 12 months ago

Looking through the git history with git blame, it appears that the note was additionally intended to be in italics but the closing asterisk was lost in https://github.com/swcarpentry/r-novice-inflammation/commit/87c47563e4424b685f7bfc9166617864176a1a09. Could you submit a pull request to fix it please?

You got it! I have made the PR.

I'm less sure about this part. I'm afraid an ordered list might give the feeling of a chronology or a hierarchy, which is not the case here. This list could be in a different order and still be completely correct. What do you think?

I see your point about the hierarchy implication. I think I wanted a way to see how these files/directories would be laid out so that there was a template of what the main package directory would look like. Something like:

package_name/
├── DESCRIPTION
├── man/
├── NAMESPACE
├── R/
└── <other_components>
Bisaloo commented 11 months ago

I see your point about the hierarchy implication. I think I wanted a way to see how these files/directories would be laid out so that there was a template of what the main package directory would look like. Something like:

package_name/
├── DESCRIPTION
├── man/
├── NAMESPACE
├── R/
└── <other_components>

I like it! My main question is how much this format is understandable for someone who is not familiar with it. I immediately understand it represents a folder tree but because I've already seen it used for this in the past.

@isaac-jennings @HaoZeke, any thoughts on this?

HaoZeke commented 11 months ago

I think it's reasonable to expect learners to understand it as a folder tree, a note could be added that it represents a folder tree much like RStudio does.