Menu Close

Reply To: What is the name of the Initial Conditions Distribution table in R

Syncrosim Forums ST-Sim & State-and-Transition Simulation Models What is the name of the Initial Conditions Distribution table in R Reply To: What is the name of the Initial Conditions Distribution table in R

#6013
Colin DanielColin Daniel
Keymaster

At present the Stratum Name is treated as a key for each Stratum in the Project Definitions. Which means that it is not easy to change the Names once the Definitions are set. We have discussed making it possible to change the values of fields like this programmatically, as you have tried to do, but haven’t yet found the funding to move ahead with that.

In the interim there are 2 ways that you could change your names. The first is to edit them directly on the screen in the user interface. Our user interface handles this because it knows about a hidden primary key in the underlying database table that allows the Name to be changed. Unfortunately this primary key is not yet exposed in rsyncrosim (but we are looking to offer this option in a future release). Of course this would be challenging for 900 values. The other way to do it programmatically would be to update the .ssim SQLite database directly. You can do this in R by connecting to your .ssim file as a SQLite database (using the RSQLite package) and then issuing a SQL command to this database to update the appropriate database table. The names of the tables in the database are the same as the corresponding datasheet names. I recommend using the free SQLiteStudio software to peruse your .ssim file in order to figure out the query. I believe you can also invoke SQL queries directly from within SQLiteStudio. Be sure to backup your library before issuing direct SQL commands however!