I have recently encountered a problem in rsyncrosim (ever since I attempted the new session creation functionality) where when I call a library and then its project, I cannot access any of the scenarios which I had previously created in SyncroSim. I have been calling my libraries both with and without a “package = landfirevegmodels” tag – I was previously able to run a landfire scenario from a library without calling the lfvm package, but when I try to run that script again, the library now believes that it is empty of even a project – but my ability to get information from (or pass information to; attempts to create scenarios have failed too) SyncroSim from R appears to have suddenly stalled out.
One thing that would cause the problem you describe is if you are using an incorrect folder/filename for the library you are trying to reopen. The ssimLibrary() function will either open an existing library (if it exists) or alternatively create a new blank library (if it does not exist). If you get the filename wrong then you will create a new empty library when you first call ssimLibrary(). Every subsequent call to ssimLibrary() will then continue to open this empty library.
You can try this code to test where SyncroSim is looking for your library:
getwd() # check to see your current working folder
addPackage("stsim") # make sure you have the package you wish to use installed
# Next line will either open test.ssim (if it exists in the working folder) OR
# create a new empty library (if it does not exist)
myLibrary = ssimLibrary("test.ssim", package = "stsim")
list.files(getwd()) # see the new test.ssim file that was created or opened
Oh shoot, you’re absolutely right! I’d checked my wd, but because I had a whole collection of ghost libraries, I couldn’t see anything wrong. Went back to SyncroSim to check my library paths and there it goes. Thanks, Colin!