RangeShifter / RangeShiftR-package

⚠️ Archive ⚠️ of the old structure of the R package as interface to the RangeShifter simulation platform. Please use the new structure: https://github.com/RangeShifter/RangeShiftR-pkg
https://rangeshifter.github.io/RangeshiftR-tutorials/
GNU General Public License v3.0
16 stars 5 forks source link

cannot use object of class “character” in new(): class “ImportedLandscape” does not extend that class #3

Open mariesoret opened 1 year ago

mariesoret commented 1 year ago

Hey, I'm trying to use rangeshiftR for a patch-based simulation with SMS dispersal. I'm trying to initialize my imported landscape as follow :

`library(RangeShiftR)

dirpath = "AO_EXP/" patpath = "AO_EXP/Inputs/AO_COREHAB_ID.asc" cospath = "AO_EXP/Inputs/AO_CF_1_100.asc" lanpath = "AO_EXP/Inputs/extend.asc"

land <- ImportedLandscape(lanpath, Resolution = 10, HabPercent = FALSE, Nhabitats = 1, K_or_DensDep = 10, PatchFile = patpath, CostsFile = cospath) `

I don't understand the error I get :

Erreur dans .nextMethod(.Object = .Object, ... = ...) : cannot use object of class “character” in new(): class “ImportedLandscape” does not extend that class

my session info : R version 4.1.1 (2021-08-10) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Debian GNU/Linux 10 (buster) RangeShiftR_1.0.4 Rcpp_1.0.9 devtools_2.4.3 rmarkdown_2.11 Rdpack_2.4