This is an R HTML document. When you click the Knit HTML button a web page will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:
Created on `r date()`
## Error in parse(text = input): <text>:1:9: unexpected symbol ## 1: Created on ## ^
## Warning: package 'forestmodel' was built under R version 4.5.3
## Warning: package 'labelled' was built under R version 4.5.3
## Warning: package 'mice' was built under R version 4.5.3
## Warning: package 'modelsummary' was built under R version 4.5.3
## Warning: package 'reactable' was built under R version 4.5.3
## Warning: package 'webshot' was built under R version 4.5.3
Component 1 - Water Availability
Component 2 - Ambient Water Quality
Component 3 - Drinking water Access
Component 4 - Sanitation and Hygiene
Component 5 - WASH-Related Health
Component 6 - Health of Water-Dependent Ecosystem
Component 7 - Water Productivity
Component 8 - Water Governance & Enabling Environment
Component 9 - Water and Climate disasters
Component 10 - Water Resource Vulnerability
Component 1 - Water Availability
names(Comp1)
## [1] "code" ## [2] "countryc1" ## [3] "Total renewable water resources per capita" ## [4] "Interannual variability" ## [5] "Water Independence"
reactable(Comp1)
datatable(Comp1, options = list(pageLength = 5, autoWidth = TRUE))
table1(~ `Total renewable water resources per capita` + `Interannual variability` + `Water Independence` , overall="Total", render.missing=NULL, data = Comp1, topclass="Rtable1-grid Rtable1-shade Rtable1-times")
| Total (N=186) |
|
|---|---|
| Total renewable water resources per capita | |
| Mean (SD) | 16900 (45500) |
| Median [Min, Max] | 3450 [0, 447000] |
| Interannual variability | |
| Mean (SD) | 1.77 (0.893) |
| Median [Min, Max] | 1.50 [0.600, 4.90] |
| Water Independence | |
| Mean (SD) | 35.6 (30.7) |
| Median [Min, Max] | 29.8 [0.300, 100] |
summary(Comp1)
## code countryc1 ## Length:186 Length:186 ## Class :character Class :character ## Mode :character Mode :character ## ## ## ## ## Total renewable water resources per capita Interannual variability ## Min. : 0 Min. :0.600 ## 1st Qu.: 1283 1st Qu.:1.100 ## Median : 3447 Median :1.500 ## Mean : 16910 Mean :1.771 ## 3rd Qu.: 14416 3rd Qu.:2.400 ## Max. :446950 Max. :4.900 ## NA's :1 NA's :25 ## Water Independence ## Min. : 0.30 ## 1st Qu.: 7.30 ## Median : 29.80 ## Mean : 35.61 ## 3rd Qu.: 60.90 ## Max. :100.00 ## NA's :63
hist(Comp1$`Total renewable water resources per capita`)
datatable(Comp1, options = list(pageLength = 10)) %>% formatStyle( 'Total renewable water resources per capita', backgroundColor = styleInterval(300000, c('white', 'lightgreen')) )
ggplot(Comp1, aes(x = `Total renewable water resources per capita`)) + geom_histogram(binwidth = 5, fill = "royalblue", color = "black") + labs(title = "Total renewable water resources per capita", x = "Values", y = "Count") + theme_minimal()
## Warning: Removed 1 row containing non-finite outside the scale range ## (`stat_bin()`).
You can also embed plots, for example:
plot(cars)