Commit 45ddd4da authored by Facundo Muñoz's avatar Facundo Muñoz ®️
Browse files

Fix visualisation of maxdr in Table 1.3.

Need to multiply by 1e5 so it displays the deat rate per 100k inhabs.
parent c79ac84c
Pipeline #17728 passed with stage
in 3 minutes and 22 seconds
......@@ -1249,18 +1249,13 @@ cap <- paste("Median values of indicators used to define the country",
cap.col1 <- paste(cap, labcol1)
tab <- as.data.frame(zd[, 1:5])
synth <- do.call(
"rbind",
by(tab,
list(Class = zd$Class),
FUN = function(x)
apply(x, 2, median)))
res <- as.data.frame(synth[order(synth[,2]),])
kable(
data.frame(Category = rownames(res), res),
zd %>%
select(Category = Class, 1:5) %>%
group_by(Category) %>%
summarise_if(is.numeric, median) %>%
arrange(maxdr) %>%
mutate(maxdr = 1e5 * maxdr) %>% # max death rate per 100h inhabs.
kable(
format = "pandoc",
booktabs = T,
row.names = F,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment