Sublaunching SLiM in R

77 views
Skip to first unread message

Yujean Kim

unread,
Aug 4, 2021, 11:36:25 AM8/4/21
to slim-discuss
Hi,

Currently I am trying to understand how to sublaunch SLiM into R. To understand this, I tried to follow the following recipe:

Even when I copy-pasted the same code and changed the file directory, I keep getting an error, as illustrated in the image I have attached. What would be the problem?

Kind regards,
Yujean Kim
Screen Shot 2021-08-04 at 4.31.58 PM.png

Ben Haller

unread,
Aug 4, 2021, 12:03:02 PM8/4/21
to slim-discuss
Hi Yujean.  My first guess would be that the SLiM model you're running is halting with an error, and that R is reporting that an error occurred.  You can check the file where you told system2() to direct error output; or you could rewrite the call to system2() to have the running process (i.e., SLiM) send its error output to R's console instead of to a file; or you could log out all of the parameters that are being sent to SLiM through system2(), and run slim the same way with the same parameters at the command line.  I can't really provide additional help on those topics, since this is an R issue, not a SLiM issue, but perhaps Sam will notice this thread and reply with further advice.

In general, because getting error messages indirectly after system2() calls is annoying, it is best to completely debug your model before you start trying to run it through an automated script like this.  :->

Cheers,
-B.

Benjamin C. Haller
Messer Lab
Cornell University


Sam Champer

unread,
Aug 5, 2021, 12:03:20 AM8/5/21
to slim-discuss
I must admit that I run SLiM from python much more often than I do from R!

As Ben mentioned, the error could indeed be happening in the underlying SLiM file itself, so that would be the first place I'd check!


On Wednesday, August 4, 2021 at 11:36:25 AM UTC-4 yujean...@gmail.com wrote:
Reply all
Reply to author
Forward
0 new messages