Converts logical SpatRaster with time attribute and one layer per day to single layer with the day of the year (doy) where the layer is 1/TRUE first.
convert_logical_to_doy(x, from = NULL, to = NULL)SpatRaster - numeric - day of year
SpatRaster - logical - with time attribute
Date - ymd - only if SpatRaster should be subset before being transformed.
Date - ymd - only if SpatRaster should be subset before being transformed.
Other SpatRaster transformation:
convert_df_to_srl(),
convert_doy_to_logical(),
convert_hour_to_meanminmax(),
convert_logical_to_time(),
convert_sr_to_cvec()