Armando Vallés
Armando Vallés

Reputation: 1

How to use R extension in Netlogo; Windows 10

I'm having a problem, while tying to make R-Extension work in netlogo. I have tried the following. Note that I'm trying this on Windows 10.

  1. Install NetLogo version 6.1.0 and R version 3.6.3
  2. Install the rJava in R
  3. Navigate to folder where NetLogo is stored and go to the 'app/extensions/r directory
  4. Open the 'user.properties' file with a text editor, (using Notepad)
  5. Edited r.home and jri.home.paths according to the returns in R of r.home() and system.file("jri", package = "rJava")
  6. After doing this I'm still getting the error number 1 message in Netlogo extension [r]

Upvotes: 0

Views: 667

Answers (2)

tonysdatamodels
tonysdatamodels

Reputation: 31

Step 1 to 3 seem correct but you don't have to do the steps after that. Just put the app folder pathway and jar file location into the command below (but obviously change the pathway to where the app folder and jar file are located on your own PC).

NLStart("C:\Program Files\NetLogo 6.2.0\app", gui = TRUE, nl.jarname = "netlogo-6.2.0.jar")

I have a full YouTube video showing this in more detail. GitHub link with all the code is in description of the YouTube video too.

https://youtu.be/zWMdaTEPTOc

Upvotes: 0

Charles
Charles

Reputation: 4168

I suggest that you look in C:\Users\username\AppData\Roaming\NetLogo\6.1\r (where "username" is, of course, your username.) This is where NetLogo installs the user.properties file for the extension. If you look at C:\Users\username\AppData\Roaming\NetLogo\6.1\extensions\r, you should find the extension itself. NetLogo changed where extensions are installed in 6.1.

If you find the extension, but not C:\Users\username\AppData\Roaming\NetLogo\6.1\r, you should create that directory and put the user.properties file there.

You can find the details here: https://github.com/NetLogo/R-Extension#installing.

Upvotes: 2

Related Questions