Menu Close

Importing an ST-Sim output to run the external programs

Syncrosim Forums ST-Sim & State-and-Transition Simulation Models Importing an ST-Sim output to run the external programs

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • #20822

    I have an external program script via R that incorporates the recent output from the state attributes in order to return a raster to constrain treatment. Under the previous versions of ST-Sim and rsyncrosim, I had a working version but the new versions doesn’t like some that syntax. I’ve updated the code but still am getting an error message:
    Error in as.character.default(new(“Scenario”, projectId = 1, scenarioId = 1, :
    no method for coercing this S4 class to a vector
    Calls: datasheetRaster -> datasheetRaster
    Execution halted

    Thanks for any suggestions!

    Leonardo FridLeonardo Frid

    Hi Kevin,

    Can you please let us know what versions of SyncroSim, ST-Sim and rsyncrosim you are currently using?



    SyncroSim = 2.3.7, ST-Sim = 3.3.5, rsyncrosim = 1.2.4. I just realized our rsyncrosim version is old.


    Here is a github link to the code:

    data = Sys.getenv(“SSIM_TRANSFER_DIRECTORY”)
    sess = session(Sys.getenv(“SSIM_PROGRAM_DIRECTORY”))
    lib = ssimLibrary(Sys.getenv(“SSIM_LIBRARY_FILEPATH”), session = sess)
    scenarioId = as.numeric(Sys.getenv(“SSIM_SCENARIO_ID”))
    myScenario = scenario(lib, scenario = scenarioId)

    • This reply was modified 2 weeks, 3 days ago by kbadikkbadik.
    Leonardo FridLeonardo Frid

    Thanks Kevin,

    Can you please upgrade rsyncrosim to the latest CRAN version (1.3.2 as of January 5, 2022) and let me know if that resolves your problem? There may be some version compatibility issues with the current SyncroSim version and the old version of rsyncrosim that you are running.

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.