Closed nstauffer closed 2 years ago
Proposed patch changes the gap_summary
variable selection step so that when by_line = TRUE
, LineKey
is included as a variable to keep.
# Subset the fields we need to output
if (by_line) {
gap_summary <- gap_summary %>%
dplyr::select(PrimaryKey, LineKey, total_line_length, interval, n, length, percent)
} else {
gap_summary <- gap_summary %>%
dplyr::select(PrimaryKey, total_line_length, interval, n, length, percent)
}
resolved on joe-dev
When spreading the object
gap_summary
into its three wide data frames whileby_line = TRUE
,tidyr::spread()
throws the following error:Error in `tidyr::spread()`: ! Each row of output must be identified by a unique combination of keys.