Skip to content

Commit a8b5f4c

Browse files
committed
explain scientific notation
1 parent 6459689 commit a8b5f4c

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

episodes/simulating-transmission.Rmd

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,12 +255,16 @@ The initial conditions are the proportion of individuals in each disease state $
255255
The initial conditions in the first age category are $S(0)=1-\frac{1}{1,000,000}$, $E(0) =0$, $I(0)=\frac{1}{1,000,000}$, $R(0)=0$. This is specified as a vector as follows:
256256

257257
```{r initial_inf}
258+
# 1 in 1,000,000 is equivalent to 1e-6
258259
initial_i <- 1e-6
259260
initial_conditions_inf <- c(
260261
S = 1 - initial_i, E = 0, I = initial_i, R = 0, V = 0
261262
)
262263
```
263264

265+
Note that R uses scientific `e` notation where `e` tells you to multiple the base number by 10 raised to the power shown ([DataKwery, 2020](https://www.datakwery.com/post/2020-07-11-scientific-notation-in-r/)).
266+
The expression $1 \times 10^{-6}$ is equivalent to `1e-6`.
267+
264268
For the age categories that are free from infection, the initial conditions are $S(0)=1$, $E(0) =0$, $I(0)=0$, $R(0)=0$. We specify this as follows,
265269

266270
```{r initial_free}

0 commit comments

Comments
 (0)