Giter Site home page Giter Site logo

madingleyr's Introduction

MadingleyR Package

Getting Started

Installing Madingley R

To install MadingleyR and MadingleyPlots (which is required for plotting the results of simulations), run the following commands:

library(devtools)
install_github("timnewbold/MadingleyR",subdir = "MadingleyR")
install_github("timnewbold/MadingleyPlots",subdir = "MadingleyPlots")

Running basic simulations

To get started with simple simulations of the Madingley Model, using default settings, you just need to run the following set of commands.

First, load the packages:

library(MadingleyR)
library(MadingleyPlots)

Then download the latest release of the Madingley Model:

codeDir <- "C:/Temp"
DownloadRelease(codeDir = codeDir)

Then download the necessary input data:

GetMadingleyData(codeDir = codeDir)

Now initialize the model, for a 50-year simulation in one grid cell:

init <- MadingleyInitialisation(duration = 50,
                                specific_locations = list(latitudes=2,longitudes=33))
params <- MadingleyParameters()

Finally, run the model:

madingleySim <- RunMadingley(codeDir = codeDir,init = init,params = params)

Plotting the basic simulations

To plot the time series of biomass densities by trophic level, simply run the following command:

PlotTemporal(resultsDir = madingleySim$outputDir,plotName = "BiomassDensity")

madingleyr's People

Contributors

timnewbold avatar

Stargazers

 avatar David A. McKay avatar

Watchers

 avatar James Cloos avatar  avatar

madingleyr's Issues

ERROR: dependency ‘sds’ is not available for package ‘MadingleyPlots’

Hello,

I'm really exited to use this package but I can't find an 'sds' package for R (I'm using v3.3.3). Do you know of a way to solve this problem?

Here is the exact error:

install_github("timnewbold/MadingleyPlots",subdir = "MadingleyPlots")
Downloading GitHub repo timnewbold/MadingleyPlots@master
from URL https://api.github.com/repos/timnewbold/MadingleyPlots/zipball/master
Installing MadingleyPlots
'/usr/lib/R/bin/R' --no-site-file --no-environ --no-save --no-restore --quiet CMD INSTALL
'/tmp/RtmpYhasIx/devtools12063c6abf1/timnewbold-MadingleyPlots-412119d/MadingleyPlots'
--library='/home/bonobo/R/x86_64-pc-linux-gnu-library/3.3' --install-tests

ERROR: dependency ‘sds’ is not available for package ‘MadingleyPlots’

  • removing ‘/home/bonobo/R/x86_64-pc-linux-gnu-library/3.3/MadingleyPlots’
    Error: Command failed (1)

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.