n <- 1e3
t <- seq(-10, 50, length.out = n)
rh <- seq(0.1, 1, length.out = length(t))
## bug exist
# i <- 88
heat_index(t[i], rh[i])
heat_index_julia(t[i], rh[i])
heat_index_vec(t[i], rh[i])
r2 <- heat_index(t, rh)
r1 <- heat_index_julia(t, rh)
r_vec <- heat_index_vec(t, rh)
julia_setup()
# add tests for julia NA values
r1 <- heat_index_julia(t*NA, rh*NA)
all.equal(r1, r2)
all.equal(r1, r_vec)
microbenchmark::microbenchmark(
r2 <- heat_index(t, rh),
r1 <- heat_index_julia(t, rh),
r_vec <- heat_index_vec(t, rh)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.