---
title: "Untitled"
output: html_document
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)

#################
#################
##NOBUTO PROOFS##
#################
#################

#source("~/../Dropbox/Grind/grind.r") # source grind from where you saved it.
source("~/brem2/Dropbox/Grind/grind.r") # source grind from where you saved it.
source("~/brem2/Dropbox/Grind/cube.R") # source grind from where you saved it.
library(tidyverse)                   # libraries inclusions (installed with install.packages("name"))
library(ggplot2)
#library(ggridges)
library(dplyr)
library(grid)
library(gridExtra)
library(scales)
#library(tidyverse)
library(ggrepel)
library(RColorBrewer)


# BELOW IS THE ODE-MODEL DEFINITION.:
model <- function(t, state, parms) {
  with(as.list(c(state,parms)), {
    
    ### Hiervan leer je dat een coexisting systeem van 2 soorten met bbs en energy gevoeliger is 
    ### voor asymetrie in energie-afhankelijkheid dan gevoeligheid in BB-afghankelijkheid. 
    dX <- r*X*( ab*B*Y/(B*Y+hb) ) * ( ae*E*Y/(E*Y+he) )*(1-X-Y) - d*X
    dY <- r*Y*( B*X/(B*X+hb) ) * ( E*X/(E*X+he) )*(1-X-Y) - d*Y
    
    return(list(c(dX, dY)))
  })
}  


```

## R Markdown

This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see <http://rmarkdown.rstudio.com>.

When you click the **Knit** button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:

```{r cars}
par(mfrow=c(1,1))
s <- c(X=0.5,Y=0.5)  
p <- c(d=0.01,r=1.0,B=1,ab=1,ae=1,E=1,he=1.0,hb=0.0) # p is a named vector of 

plane(vector=T,grid=3,xmax=1,ymax=1)

run(tmax=10000,tstep=10)
newton(plot=T)







```

## Including Plots

You can also embed plots, for example:

```{r pressure, echo=FALSE}
plot(pressure)
```

Note that the `echo = FALSE` parameter was added to the code chunk to prevent printing of the R code that generated the plot.
