Skip to content

Commit

Permalink
updated vingette
Browse files Browse the repository at this point in the history
  • Loading branch information
benyamindsmith committed Oct 28, 2024
1 parent 1e1dfd3 commit 1ec7cbf
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions vignettes/understanding-prngs.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,19 @@ While it is possible for one to utilize their own PRNG through use of user-suppl
```{r}
library(randngen)
# Function from here: https://stackoverflow.com/questions/5468280/scale-a-series-between-two-points
range01 <- function(x){(x-min(x))/(max(x)-min(x))}
randngen::lcg(seed = 1234, n=10000)|>
range01()|>
hist()
hist(main= "0-1 Scaled Uniform Random Variables with randgen::lcg()")
```

```{r}
set.seed(1234)
runif(10000)|>
hist()
hist(main= "0-1 Uniform Random Variables with runif()")
```


Expand Down

0 comments on commit 1ec7cbf

Please sign in to comment.