|
47 | 47 | #' # Finding combinations ------------------------------------------------------ |
48 | 48 | #' fruits <- tibble( |
49 | 49 | #' type = c("apple", "orange", "apple", "orange", "orange", "orange"), |
50 | | -#' year = c(2010, 2010, 2012, 2010, 2011, 2012), |
| 50 | +#' year = c(2010, 2010, 2012, 2014, 2011, 2012), |
51 | 51 | #' size = factor( |
52 | 52 | #' c("XS", "S", "M", "S", "S", "M"), |
53 | 53 | #' levels = c("XS", "S", "M", "L") |
|
70 | 70 | #' # Other uses ---------------------------------------------------------------- |
71 | 71 | #' # Use with `full_seq()` to fill in values of continuous variables |
72 | 72 | #' fruits %>% expand(type, size, full_seq(year, 1)) |
73 | | -#' fruits %>% expand(type, size, 2010:2013) |
| 73 | +#' # Or write range explicitly |
| 74 | +#' fruits %>% expand(type, size, 2010:2014) |
74 | 75 | #' |
75 | 76 | #' # Use `anti_join()` to determine which observations are missing |
76 | 77 | #' all <- fruits %>% expand(type, size, year) |
|
0 commit comments