Skip to contents

Looks for NAs (gaps) in a data series and counts the number of NAs. Useful for smooth_points_df, which can fill gaps up to a certain length. 0 means no gap, 1 means a single NA, and so forth.

Usage

find_gaps_df(.data, cols, .frame = frame, .out = c("gaplen"))

Arguments

.data

Data frame containing the midlines.

cols

Columns containing the components to be smoothed. Often these will be the x and y coordinates of the midline.

.frame

Column identifying frames (default is frame)

.out

Name of the column to contain the length of the gap.

Value

The data frame with a new column.