ELSA-UNDP / elsar

Creative Commons Attribution 4.0 International
1 stars 0 forks source link

Add some additional options to make_normalised_raster() #31

Closed scabecks closed 3 weeks ago

scabecks commented 3 weeks ago
sandra-neubert commented 3 weeks ago

Looks good @scabecks, just some small things: I think it would be good to generalise the structure of functions and use %>% instead of |> (just because I used this in all other functions so far). I only saw this once now in line 96 in make_normalised_raster(). And when writing the roxygen skeleton I think it would also be good to have a generic way of doing it - I don't mind which way, but I saw that in make_normalised_raster() you give the inputs with [] (e.g. raster_in [SpatRaster] ), but not in the other new function you added. I really like the idea of including the conditional expression!

scabecks commented 3 weeks ago

@sandra, the roxygen formatting is just me being lazy and having chatgpt fill in the commenting - and it's never constant. Good idea though - we'll stick with the generic way that exists already.