mirror of
https://github.com/msberends/AMR.git
synced 2026-06-29 18:16:20 +02:00
improve top_n_microorganisms(): add property_for_each, fix property=NULL, enforce rank order (#297)
This commit is contained in:
21
CLAUDE.md
21
CLAUDE.md
@@ -85,6 +85,27 @@ _pkgdown.yml # pkgdown website configuration
|
||||
- `translate.R` — 28-language translation system
|
||||
- `ggplot_sir.R` / `ggplot_pca.R` / `plotting.R` — visualisation functions
|
||||
|
||||
## Code Style
|
||||
|
||||
Follow the [tidyverse style guide](https://style.tidyverse.org/) precisely. Key rules:
|
||||
|
||||
- 2-space indentation; no tabs
|
||||
- `<-` for assignment, not `=`
|
||||
- Spaces around all binary operators and after commas; no spaces inside parentheses
|
||||
- When a function call must break across lines, place the first argument on a new line indented by 2 spaces, and put the closing `)` on its own line — **never align arguments to the opening parenthesis** (no hanging/forced mid-line indentation)
|
||||
|
||||
```r
|
||||
# good
|
||||
stop_(
|
||||
"some long message part one ",
|
||||
"part two"
|
||||
)
|
||||
|
||||
# bad — forces indentation to match the opening parenthesis
|
||||
stop_("some long message part one ",
|
||||
"part two")
|
||||
```
|
||||
|
||||
## Custom S3 Classes
|
||||
|
||||
The package defines five S3 classes with full print/format/plot/vctrs support:
|
||||
|
||||
Reference in New Issue
Block a user