fdschneider / caspr

Cellular Automata for Spatial Pressure in R
MIT License
4 stars 0 forks source link

function for patch size fitting #2

Closed fdschneider closed 9 years ago

fdschneider commented 9 years ago

function input:

fdschneider commented 9 years ago

@ssumithra I remember we said that you will provide a function for that? However, a working function is now implemented in R. Maybe we can check the validity by comparing the output to your function.

ssumithra commented 9 years ago

Yes yes yes. We should check this. Also, my area-perimeter code calculates the patch distribution anyway (because the perimeter of each patch needs to be tied to its are). So we may want to see if we want to do away with this double calculation, and if so how, etc..

On 18 June 2015 at 16:02, Florian Schneider notifications@github.com wrote:

@ssumithra https://github.com/ssumithra I remember we said that you will provide a function for that? However, a working function is now implemented in R. Maybe we can check the validity by comparing the output to your function.

— Reply to this email directly or view it on GitHub https://github.com/fdschneider/caspr/issues/2#issuecomment-113166444.

guttal commented 9 years ago

Yes, it makes sense to calculate patch-sizes only once, keep in an array/equivalent, and use it for both area-permimeter and distribution calculations.

fdschneider commented 9 years ago

There is also a function included in the spatial_warnings package.

Then for now, let's just include all our candidate functions in patches.R. I will compare them in a benchmark test and chose the fastest and safest. For compatibility the functions should:

fdschneider commented 9 years ago

This is an issue at 'spatial_warnings' package now.