Reknitted 2026 - #28
Conversation
GreatEmerald
left a comment
There was a problem hiding this comment.
Thanks! Here are a few points to improve before merging.
| Everything seems correct. | ||
|
|
||
| We want to look at a transect, which we can draw by hand by selecting two points by clicking. The `draw('line')` function will help us do that. Once you run the function, you will be able to click in the plotting window of R (The `bel` object should already be present in the plot panel before running `draw('line')`). Press *esc* once you have selected the two extremities of the line. | ||
| We want to look at a transect, which we can draw by using two points. The `vect()` function will help us do that. It requires a matrix of the coordinates. Once you run the function, you will be able to click in the plotting window of R (The `bel` object should already be present in the plot panel before running `draw('line')`). Press *esc* once you have selected the two extremities of the line. |
There was a problem hiding this comment.
A few issues here: 1) there is still some text left over from the draw() that doesn't make sense when we don't use it here, 2) we generally try to consistently use sf objects rather than terra vector objects. So it's better to use st_point() or st_line() here. In that case, the next paragraph also needs to be adjusted, since we will not have the writing issue any more.
There was a problem hiding this comment.
Addressed issue 1 and; 2 - Now using only sf objects
|
I think this fixes #19, but do also check the other issues and see if they can be solved as well (though not necessarily in this pull request). |
GreatEmerald
left a comment
There was a problem hiding this comment.
Thanks! One quick question below, and then it should be good to go.
| ## Prepare the data | ||
|
|
||
| ```{r} | ||
| ```{r, eval=FALSE} |
There was a problem hiding this comment.
Why all the eval=FALSE? This code should run correctly in the virtual machines, and potentially produce output.
There was a problem hiding this comment.
Ah few blocks were redownloading the data into the repo. And then later I only made text changes, so I made eval=FALSE and forgot to chage them back. Of course, the script produces output correctly. Should I change them back or not necessary
Updated terra::draw('line') to vect() function to draw line from coordinates