Git Product home page Git Product logo

netlogo-role-of-institutions's Introduction

1. Install R

After installing R, run the following command on the terminal:

$sudo R CMD javareconf

1.1 Install R packages

install.packages("rJava")

install.packages("igraph")

1.2 In R, run these two commands:

R.home(component = "home")

[1] "/usr/lib/R"

system.file("jri", package = "rJava")

[1] "/home/ubuntu/R/x86_64-pc-linux-gnu-library/3.5/rJava/jri"

1.3 Use the returned folders to set these two environment variables

export R_HOME=/usr/lib/R

export JRI_HOME=/home/dvgodoy/R/x86_64-pc-linux-gnu-library/3.5/rJava/jri

2. Download and Unzip NetLogo 5.0.5

https://ccl.northwestern.edu/netlogo/5.0.5/netlogo-5.0.5.tar.gz

tar -xvzf netlogo-5.0.5.tar.gz

2.1 Download and Unzip R-Extension for NetLogo (v1.4)

https://sourceforge.net/projects/r-ext/files/

Unzip into your NetLogo folder, subfolder extensions

2.2 Test your installation

Run NetLogo with netlogo.sh.

In the code tab, type:

extensions [r]

And click the "check" button. It shouldn't raise any errors.

3. Clone this repository

3.1 Load RoleOfInstitutions.nlogo model in NetLogo

Open r_functions.nls.

On r-load procedure, edit source('functions.R') to source('/path/to/folder/functions.R')

3.2 Click on SETUP button, it should initialize the simulation. Click GO and watch it run!

netlogo

netlogo-role-of-institutions's People

Contributors

dvgodoy avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.