Skip to contents

This function helps to build the data frame (pixels by data columns) for only vegetated pixels to improve the efficiency. Note that the `LC` field using the `MODIS land cover` observations (MCD12Q1.061) must be supplied in the covariates to make this function work.

Usage

stack_covariates_2_df(rast.dir, cores = parallel::detectCores())

Arguments

rast.dir

character: a character that points to the covariates raster file generated by the `stack_covariates_2_geotiff` function.

cores

numeric: how many CPus to be used in the calculation, the default is the total CPU number you have.

Value

list containing the data frame of covariates for vegetated pixels and the corresponding index of the pixels.

Author

Dongchen Zhang