Function for converting a raster to a dataframe.
rast_to_df(x, time_dim)
Rast stack resulted from detect3event and re-organized until 'nc_no_NA' (see detect3 function)
The time dimension. It should be a single value to use as the origin for the date indexes
This function will convert a raster object to a dataframe.