Fixes problem on matching names.

parent 67187ed6
......@@ -41,6 +41,8 @@ my_match <- function(x, y, min.match = 2) {
#
# @return data.frame com os vetores pareados.
#
x <- iconv(x, to = "ASCII//TRANSLIT")
y <- iconv(y, to = "ASCII//TRANSLIT")
xs <- strsplit(x, split = "\\s+")
ys <- strsplit(y, split = "\\s+")
m <- character(length(x))
......@@ -113,6 +115,8 @@ nt <- nt %>%
unite(col = "nome", nome, sobrenome, sep = " ")
str(nt)
# sort(toupper(nt$nome))
# dput(names(nt))
names(nt) <- c("nome",
sprintf("sabatina %02d", 1:9),
......@@ -207,6 +211,7 @@ ntst
# Caixa alta nos nomes e arredondamento.
ntst <- ntst %>%
mutate(nome = toupper(nome),
nome = iconv(nome, to = "ASCII//TRANSLIT"),
S_escore = ceiling(S_escore))
str(ntst)
......@@ -218,12 +223,13 @@ ntst <- ntst %>%
# View(arrange(ntst, Média))
nt <- ntst
# View(nt)
#-----------------------------------------------------------------------
# Pareamento do GRR para colocar na tabela.
# Faz o pareamento dos nomes.
a <- my_match(x = nt$nome, mat$nome)
# View(a)
str(a)
# Junção completa para inclusão do GRR.
......@@ -240,10 +246,12 @@ nt %>%
filter(is.na(GRR)) %>%
select(nome) %>%
print(right = FALSE, row.names = FALSE, print.gap = FALSE)
# View(nt)
nt <- nt %>%
filter(!is.na(GRR)) %>%
arrange(GRR)
# View(arrange(nt, nome))
#-----------------------------------------------------------------------
# Tabela em HTML.
......
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