View source: R/find_missing_starts.R
find_missing_starts | R Documentation |
`data`
Tells you which values and (optionally) skip-to-numbers
that are
recursively removed when using the "l_starts"
method with `remove_missing_starts`
set to TRUE
.
find_missing_starts(data, n, starts_col = NULL, return_skip_numbers = TRUE)
data |
N.B. If |
n |
List of starting positions. Skip values by See |
starts_col |
Name of column with values to match
when |
return_skip_numbers |
Return |
List of start values and skip-to-numbers
or a vector
with the start values.
Returns NULL
if no values were found.
N.B. If `data`
is a grouped data.frame
,
the function is applied group-wise and the output is a
list
of either vector
s or list
s.
The names are based on the group indices
(see dplyr::group_indices()
).
Ludvig Renbo Olsen, r-pkgs@ludvigolsen.dk
Other l_starts tools:
differs_from_previous()
,
find_starts()
,
group_factor()
,
group()
# Attach packages
library(groupdata2)
# Create a data frame
df <- data.frame(
"a" = c("a", "a", "b", "b", "c", "c"),
stringsAsFactors = FALSE
)
# Create list of starts
starts <- c("a", "e", "b", "d", "c")
# Find missing starts with skip_to numbers
find_missing_starts(df, starts, starts_col = "a")
# Find missing starts without skip_to numbers
find_missing_starts(df, starts,
starts_col = "a",
return_skip_numbers = FALSE
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.