Nothing
##'HC_ELEC_H_ELC Percentage of households with electricity
##' ph_electric in github
##' HR
#' @param Rdata data.frame from surveyPrev::getDHSdata
#'
#' @return A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
#'
#' @author Miaolei Bao, Yunhan Wu, Qianyu Dong
#' @examples
#' \dontrun{
#' dhsData <- getDHSdata(country = "Zambia", indicator = "HC_ELEC_H_ELC", year = 2018)
#' }
#'
#' @export
HC_ELEC_H_ELC<- function(Rdata){
# weight variable
HRdata <- Rdata %>%
mutate(wt = hv005/1000000)
# //Have electricity
HRdata <- HRdata %>%
mutate(HC_ELEC_H_ELC = hv206) %>%
set_value_labels(HC_ELEC_H_ELC = c("Yes" = 1, "No"=0)) %>%
set_variable_labels(HC_ELEC_H_ELC = "Have electricity")
colnames(HRdata)[colnames(HRdata) == 'HC_ELEC_H_ELC'] <- 'value'
return(HRdata)
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.