Closed tmieno2 closed 4 months ago
Okay, so I did a little bit of digging. It is because of no intersection result from st_intersection() in the code below within find_center()
.
line_coords <-
st_intersection_quietly(trial_plot[1, ], ab_line) %>%
.$result %>%
sf::st_coordinates()
The red ab-line happens to be just outside of the trial_plot
you picked earlier in the code.
Also,
trial_plot[1, ]
in the above code always points to the polygon for the first input. Is that desired behavior? Using your codes for debugging, this is what I am getting:
@tmieno2 Interesting, I will look at all of these today. This shouldn't be possible if the code is working as expected because the plot is chosen specifically to be the plot that intersects with the line. However, I've been thinking about changing the way it is done, so I will work on that today along with the other comments.
@tmieno2 I'm having trouble replicating this error inside the V0 script. Did you already fix this one?
No I did not do anything. Let me run that again.
Weird. I just ran it and now it works just fine. Closing this.
@brittanikedge, I just realized that
make_trial_report()
was not exported, meaning it avoided the scrutiny of R CMD check. I am working on modifying it a bit without trying to break it. Setting that aside, when I ranmake_trial_report()
in V0-basic-work-flow.Rmd, it produced this error.Can you take a look?