Last active
May 8, 2021 18:00
-
-
Save DATAUNIRIO/c86c3edffee02f713aa8d7c079580fdc to your computer and use it in GitHub Desktop.
Criação de Índice de Absenteísmo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#------------------------------------------------------------------------------------------- | |
# Versão 1 - modificado em 08/05/2021 (Thayanne Pinheiro) | |
#------------------------------------------------------------------------------------------- | |
# Carregar as bibliotecas | |
library(janitor) | |
library(readxl) | |
library(dplyr) | |
# Carregar a base de dados e limpar o nome da variavel | |
ab_adm <- read_excel("~/Downloads/absentismo_adm.xlsx") %>% clean_names() | |
head(ab_adm) | |
# Criar o indice absenteismo | |
ab_adm$soma_absenteismo <- rowSums(ab_adm[,15:33],na.rm = F) | |
ab_adm$indice_absenteismo<- (ab_adm$soma_absenteismo/19) | |
# Teste de funcionamento da função criada | |
summary(ab_adm$indice_absenteismo) | |
boxplot(indice_absenteismo ~ genero_que_se_identifica, data=ab_adm,col=c("pink",'lightblue')) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment