Skip to content

Do not munch data too much #5644

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion R/coord-munch.R
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ munch_data <- function(data, dist = NULL, segment_length = 0.01) {
}

# How many endpoints for each old segment, not counting the last one
extra <- pmax(floor(dist / segment_length), 1)
extra <- pmin(pmax(floor(dist / segment_length), 1), 1e4)
extra[is.na(extra)] <- 1
# Generate extra pieces for x and y values
# The final point must be manually inserted at the end
Expand Down