I have a function I made for this. It uses sp, but it might be what you need. Use projected coordinates.
Well, I found some bugs in my function, so that's a bummer. It'll take me some time to sort that out. When I applied it to a large data set of numerous rivers, I found that r's
seq function has some floating point issues and isn't working as I expected. That said, this works on roughly 95% of the lines I pass to it. If you have a study area in mind this might be ok, as it as been for me in the past.
This example assumes that you can work with columns in
data.table that have spatial objects. There is probably a better solution out there than this. I haven't had to apply this to such a big file before.
## shapefile -> https://pubs.usgs.gov/dds/dds-81/TopographicData/River/
## river.shp, not UTM. Using geographic coordinates to match OP's example.
## reading in river.shp using sf and converting to UTM
riv <- st_read("./rivers.shp")
riv <- st_transform(riv, 3157)
## converting to sp and making a list of river segements by record in spatial df
rivSegs <- as(riv, "Spatial")
rivSegs <- lapply(1:length(rivSegs), function(x) rivSegs[x,])
## setting up parallel cluster for iterating over spatial object
## this should work in windows or linux (mac also, probably..)
cl <- makeCluster(detectCores() - 1, outfile = "")
## running splitLines against river segment list
rivSplit <- parLapply(cl, rivSegs[1:40], splitLines, dist = 100)
## test plot
plot(rivSegs[], add = T, col = 'red')
## building data.table of original attributes and adding sp list items
## converting back to sf for consistancy
out <- data.table(riv[1:40,])
out[,segments:=lapply(rivSplit, as, "sf")]