convert_to_mmoll <- function(x, from = "g/l") {
switch(EXPR = tolower(from),
"g/l" = {x / 0.18},
"mg/l" = {x / 0.18 / 100},
"mmol/l" = {x},
stop("Please check Units: g/l, g/L, mg/l, mg/Ln, mmol/l or mmol/L!")
)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.