You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
function as well as the marxan_problem function require the features to be supplied as rasters.
The initial idea for the marxan_problem function was this:
p <-marxan_problem(pu_polygons, cost=..., features=..., locked_in=...,
locked_out=..., penalty=..., edge_factor=....)
where the dots are column names or vectors of values.
I think it would be great to allow for the latter case.
Along the same lines, I think it would also be good if in the standard 'problem' function we would allow to mix spatialdataframe classes with dataframes (as features). That's the way I often use shapfefiles and csv files together. Not sure how common it is, but I would imagine its fairly common.
@jeffreyhanson, how is your availability in the next little while? Do you still have time to tackle these things or do you need to focus on finishing your PhD?
The text was updated successfully, but these errors were encountered:
To implement this, we could add the following method to problem:
p <- problem(cost, features, cost_name)
where cost is a SpatialPolygonsDataFrame class, cost_name is a character specifying the column name with cost, and features is a character vector specifying the column names with the feature abundances. So that users can specify the problem data using just a SpatialPolygonsDataFrame.
We would probably have to switch problem to S4 though, since S3 won't allow dispatch on multiple arguments.
After adding this functionality, it would be pretty straight forward to add a new method to the marxan_problem that does what you want.
I don't really have the time at the moment to work on this. I might be able to find some spare time in the next few weeks, but I can't make any promises.
Thanks Jeff. I can try to work this out. Will be good practice for me anyways.
In case you do get a chance to look at this, please let me know so we don't overlap in our efforts.
It seems to me that both the 'standard'
function as well as the marxan_problem function require the features to be supplied as rasters.
The initial idea for the marxan_problem function was this:
where the dots are column names or vectors of values.
I think it would be great to allow for the latter case.
Along the same lines, I think it would also be good if in the standard 'problem' function we would allow to mix spatialdataframe classes with dataframes (as features). That's the way I often use shapfefiles and csv files together. Not sure how common it is, but I would imagine its fairly common.
@jeffreyhanson, how is your availability in the next little while? Do you still have time to tackle these things or do you need to focus on finishing your PhD?
The text was updated successfully, but these errors were encountered: