Find row numbers for adjacent entries
adjacent_rownums.Rd
Given .DF
, find the row numbers that contain the first instance
in col_name
of adjacent entries
,
this function finds the row number of the adjacent entries
.
Arguments
- .DF
the data frame in which to search for
entries
incol_name
.- col_name
the column of
.DF
in which to search for consecutiveentries
.- entries
a vector of length 2 representing the consecutive entries in
col_name
for which to search.
Value
an integer vector of length 2 giving the rows for entries[[1]]
and entries[[2]]
, whose difference is 1.
NULL
if no consecutive entries
are found in col_name
.