Skip to content

Commit

Permalink
Added echo function
Browse files Browse the repository at this point in the history
  • Loading branch information
marruett committed Jan 28, 2019
1 parent 4ccf998 commit 48c0d31
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
4 changes: 3 additions & 1 deletion Calluna_model.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ options(knitr.table.format = "html")
```

The input table is ...
```{r}
```{r, echo=FALSE}
input_table <- read.csv("Calluna_low_prophy.csv")
input_table <-select(input_table, -X, -General.variables, - Description, - median)
kable(input_table)%>%
Expand All @@ -42,7 +42,9 @@ make_variables(estimate_read_csv(input_table))
Calculate the number of plants in the whole production area
```{r}
original_plant_number <- production_area * plants_per_ha
```

```{r, echo=FALSE}
original_plant_number
```
Define risky months (May to August)
Expand Down
14 changes: 4 additions & 10 deletions Calluna_model.html
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,7 @@ <h4 class="date"><em>1/22/2019</em></h4>
</div>


<p>The input table is …</p>
<pre class="r"><code>input_table &lt;- read.csv(&quot;Calluna_low_prophy.csv&quot;)
input_table &lt;-select(input_table, -X, -General.variables, - Description, - median)
kable(input_table)%&gt;%
kable_styling(bootstrap_options = c(&quot;striped&quot;, &quot;hover&quot;)) </code></pre>
The input table is …
<table class="table table-striped table-hover" style="margin-left: auto; margin-right: auto;">
<thead>
<tr>
Expand Down Expand Up @@ -725,10 +721,8 @@ <h4 class="date"><em>1/22/2019</em></h4>
<div id="calluna-function-in-decisionsupport" class="section level2">
<h2>Calluna function in <code>decisionSupport</code></h2>
<p>Calculate the number of plants in the whole production area</p>
<pre class="r"><code> original_plant_number &lt;- production_area * plants_per_ha

original_plant_number</code></pre>
<pre><code>## [1] 732896.8</code></pre>
<pre class="r"><code> original_plant_number &lt;- production_area * plants_per_ha</code></pre>
<pre><code>## [1] 747045.7</code></pre>
<p>Define risky months (May to August)</p>
<pre class="r"><code> W &lt;- weather_arguments_for_infection &lt;- c(0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0)</code></pre>
<p>Simulate the infection risk for each month under uncertainty</p>
Expand Down Expand Up @@ -937,7 +931,7 @@ <h2>Calluna function in <code>decisionSupport</code></h2>

return(list(NetPresentValue = NPV))</code></pre>
<pre><code>## $NetPresentValue
## [1] -159384.3</code></pre>
## [1] 449153.6</code></pre>
</div>


Expand Down

0 comments on commit 48c0d31

Please sign in to comment.