zoonproject / zoon

The zoon R package
Other
61 stars 13 forks source link

naming conflict in Background() module when bias layer is used #388

Closed kapitzas closed 7 years ago

kapitzas commented 7 years ago

workflow that combines LocalRaster() covariates and Background() with bias layer cannot be completed due to the following error:

Caught` errors:
Error in `[.data.frame`(.df, , attr(.df, "covCols")): undefined columns selected

The error stems from Background() line 94 attr(df, 'covCols') <- names(ras). When a biaslayer is provided it gets passed to function object ras, and names(ras) becomes the name of the biaslayer, rather than names from the covariate stack.

goldingn commented 7 years ago

Thanks Simon!

For anyone else reading this, the problem should be easy to fix and Simon is working on it.