Open domisch opened 4 months ago
I looked at it, and I don't think it depends on whether you have a basin raster on disk. The function uses the variable "basin_layer" in line 289, but the variable is never defined, not as a parameter in the function definition (lines 122-123) nor later. If I'm not wrong, the function should fail all the time (in windows), no matter what you have on disk. Unless I understand R fundamentally wrong :D but I cannot test this as I don't have windows (@tomitho , @ytorres-cambas ?).
So, just remove the entire line wsl_basin_layer <- fix_path(basin_layer)
, this should fix the problem and not affect the functionality in any way.
By running
without having a basin.tif on disk, the function fails as it keeps looking for "basin_layer" (but the user does not now if a basin layer should be supplied). Most probably it's because of this line:
wsl_basin_layer <- fix_path(basin_layer)
Is the basin-layer actually needed for the function or can this line be commented / removed?