Learn R Programming

PHENTHAUproc (version 1.1.1)

convert_logical_to_doy: Convert logical to day of year (doy)

Description

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.

Usage

convert_logical_to_doy(x, from = NULL, to = NULL)

Value

SpatRaster - numeric - day of year

Arguments

x

SpatRaster - logical - with time attribute

from
  • Date - ymd - only if SpatRaster should be subset before being transformed.

to
  • Date - ymd - only if SpatRaster should be subset before being transformed.

See Also

Other SpatRaster transformation: convert_df_to_srl(), convert_doy_to_logical(), convert_hour_to_meanminmax(), convert_logical_to_time(), convert_sr_to_cvec()