forsys-sp / forsysr

An R implementation of the ForSys program
GNU General Public License v3.0
8 stars 3 forks source link

patchmax_sample_frac fails #90

Closed michelledayusfs closed 1 year ago

michelledayusfs commented 1 year ago

Tried to run patchmax within forsys and it kicked an error with patchmax_sample_frac

run_outputs_decline = forsys::run(
  return_outputs = TRUE,
  write_outputs = TRUE,
  stand_data = shp,
  scenario_name = "patchmax_forsys_decline",
  stand_id_field = "LMU_ID",
  stand_area_field = "Acres",
  global_threshold = 'bioacre > 0',
  scenario_priorities = c("bioacre_SPM"),
  scenario_output_fields = c("Acres", "Am4RevBio", "bioacre"),
  run_with_patchmax = TRUE,
  patchmax_proj_size = 500,
  patchmax_proj_number = 10,
  patchmax_SDW = 1,
  patchmax_EPW = 0, 
  patchmax_sample_frac = 1
)

Error in pm$search(sample_frac = sample_frac, show_progress = T) : unused argument (sample_frac = sample_frac)

codyevers commented 1 year ago

Should be working now. I needed up update how the random sample was set in patchmax wrapper. Two steps forward, one step back.

michelledayusfs commented 1 year ago

Fixed.