allisonhorst / allisonhorst/palmerpenguins
query about use of factors in the penguins dataset
- Lingua principale
- R
- Stelle
- 1k
- Fork
- 252
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
I *love* the penguins. Thanks for putting this together.
I had one question. Dospecies, island, and sex need to be factors?
As an example of how leaving them as character vectors might be preferable, imagine an analysis that considers penguins on only two island. If `dplyr::filter()` is used then there's still a stray factor level that needs to be dropped.
Would it be feasible to move to characters in a future release?
``` r
suppressPackageStartupMessages(library(dplyr))
library(palmerpenguins)
glimpse(penguins)
#> Rows: 344
#> Columns: 8
#> $ species Adelie, Adelie, Adelie, Adelie, Adelie, Adelie, Ade…
#> $ island Torgersen, Torgersen, Torgersen, Torgersen, Torgers…
#> $ bill_length_mm 39.1, 39.5, 40.3, NA, 36.7, 39.3, 38.9, 39.2, 34.1,…
#> $ bill_depth_mm 18.7, 17.4, 18.0, NA, 19.3, 20.6, 17.8, 19.6, 18.1,…
#> $ flipper_length_mm 181, 186, 195, NA, 193, 190, 181, 195, 193, 190, 18…
#> $ body_mass_g 3750, 3800, 3250, NA, 3450, 3650, 3625, 4675, 3475,…
#> $ sex male, female, female, NA, female, male, female, mal…
#> $ year 2007, 2007, 2007, 2007, 2007, 2007, 2007, 2007, 200…
```
Created on 2020-08-02 by the [reprex package](https://reprex.tidyverse.org) (v0.3.0)
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Valutazione
Questa issue non è ancora stata valutata.