9
9
status] ( https://www.r-pkg.org/badges/version/forcats )] ( https://cran.r-project.org/package=forcats )
10
10
[ ![ R-CMD-check] ( https://github.com/tidyverse/forcats/workflows/R-CMD-check/badge.svg )] ( https://github.com/tidyverse/forcats/actions )
11
11
[ ![ Codecov test
12
- coverage] ( https://codecov.io/gh/tidyverse/forcats/branch/master /graph/badge.svg )] ( https://codecov.io/gh/tidyverse/forcats?branch=master )
12
+ coverage] ( https://codecov.io/gh/tidyverse/forcats/branch/main /graph/badge.svg )] ( https://codecov.io/gh/tidyverse/forcats?branch=main )
13
13
<!-- badges: end -->
14
14
15
15
## Overview
@@ -45,7 +45,7 @@ factors](https://r4ds.had.co.nz/factors.html) in R for Data Science.
45
45
46
46
## Cheatsheet
47
47
48
- <a href =" https://github.com/rstudio/cheatsheets/raw/master /factors.pdf " ><img src =" https://raw.githubusercontent. com/rstudio/cheatsheets/master /pngs/thumbnails/forcats-cheatsheet-thumbs.png " width =" 320 " height =" 252 " /></a >
48
+ <a href =" https://github.com/rstudio/cheatsheets/raw/HEAD /factors.pdf " ><img src =" https://github. com/rstudio/cheatsheets/raw/HEAD /pngs/thumbnails/forcats-cheatsheet-thumbs.png " width =" 320 " height =" 252 " /></a >
49
49
50
50
## Getting started
51
51
@@ -62,7 +62,7 @@ library(ggplot2)
62
62
starwars %> %
63
63
filter(! is.na(species )) %> %
64
64
count(species , sort = TRUE )
65
- # > # A tibble: 37 x 2
65
+ # > # A tibble: 37 × 2
66
66
# > species n
67
67
# > <chr> <int>
68
68
# > 1 Human 35
@@ -83,9 +83,9 @@ starwars %>%
83
83
filter(! is.na(species )) %> %
84
84
mutate(species = fct_lump(species , n = 3 )) %> %
85
85
count(species )
86
- # > # A tibble: 4 x 2
86
+ # > # A tibble: 4 × 2
87
87
# > species n
88
- # > * <fct> <int>
88
+ # > <fct> <int>
89
89
# > 1 Droid 6
90
90
# > 2 Gungan 3
91
91
# > 3 Human 35
@@ -116,7 +116,7 @@ For a history of factors, I recommend [*stringsAsFactors: An
116
116
unauthorized
117
117
biography* ] ( https://simplystatistics.org/2015/07/24/stringsasfactors-an-unauthorized-biography/ )
118
118
by Roger Peng and [ * stringsAsFactors =
119
- & lt ; sigh& gt ; * ] ( https://notstatschat.tumblr.com/post/124987394001/stringsasfactors-sigh )
119
+ \< sigh> * ] ( https://notstatschat.tumblr.com/post/124987394001/stringsasfactors-sigh )
120
120
by Thomas Lumley. If you want to learn more about other approaches to
121
121
working with factors and categorical data, I recommend [ * Wrangling
122
122
categorical data in R* ] ( https://peerj.com/preprints/3163/ ) , by Amelia
0 commit comments