Skip to content
Snippets Groups Projects
Commit a861cd11 authored by Walmes Marques Zeviani's avatar Walmes Marques Zeviani
Browse files

Inclui nota dos trabalhos e descrição da média.

parent 5df6be57
No related branches found
No related tags found
No related merge requests found
...@@ -66,7 +66,7 @@ if (length(index$s) >= 4) { ...@@ -66,7 +66,7 @@ if (length(index$s) >= 4) {
} }
# Pesos de cada forma de avaliação. # Pesos de cada forma de avaliação.
pesos <- c(s = 0.7, t = 0.3) pesos <- c(s = 0.7, p = 0, t = 0.3)
# Colunas de notas presentes. # Colunas de notas presentes.
u <- unlist(index[1:4]) u <- unlist(index[1:4])
...@@ -89,8 +89,6 @@ if (length(index$s) > 1) { ...@@ -89,8 +89,6 @@ if (length(index$s) > 1) {
}) })
} }
(5 * 100 + 95)/6
# Calcula a média nas provas. # Calcula a média nas provas.
if (length(index$p)) { if (length(index$p)) {
nt$mp <- apply(X = cbind(nt[, c(index$p)]), nt$mp <- apply(X = cbind(nt[, c(index$p)]),
...@@ -121,7 +119,7 @@ pesos <- pesos[a] ...@@ -121,7 +119,7 @@ pesos <- pesos[a]
if (length(pesos)) { if (length(pesos)) {
# Reescala os pesos. # Reescala os pesos.
pesos <- pesos/sum(pesos) pesos <- pesos/sum(pesos)
stopifnot(sum(pesos) == 1) stopifnot(as.integer(sum(pesos)) == 1L)
nt$MF1 <- c(as.matrix(nt[, j]) %*% cbind(pesos)) nt$MF1 <- c(as.matrix(nt[, j]) %*% cbind(pesos))
} }
...@@ -186,7 +184,7 @@ v <- v[v %in% names(nt)] ...@@ -186,7 +184,7 @@ v <- v[v %in% names(nt)]
# Legenda da tabela. # Legenda da tabela.
cap <- cap <-
"Notas nas avaliações (S: sabatina, B: sabatina bonus, T: trabalho) ordenadas pelo GRR. Valores entre 0 e 100." "Notas nas avaliações (S: sabatina, B: sabatina bonus, T: trabalho) ordenadas pelo GRR. Valores entre 0 e 100.*"
``` ```
```{r, eval = FALSE, echo = FALSE, results = "asis"} ```{r, eval = FALSE, echo = FALSE, results = "asis"}
...@@ -198,6 +196,24 @@ x <- knitr::kable(subset(nt, select = v), ...@@ -198,6 +196,24 @@ x <- knitr::kable(subset(nt, select = v),
cat(gsub("\\bNA\\b", "--", x), sep = "\n") cat(gsub("\\bNA\\b", "--", x), sep = "\n")
``` ```
<style type="text/css">
/* ATTENTION: propriedades da tabela do DT::datatable() */
table.dataTable thead th,
table.dataTable thead td {
padding: 3px 6px;
}
table.dataTable tbody th,
table.dataTable tbody td {
padding: 1px 6px;
}
table.dataTable th.dt-right,
table.dataTable td.dt-right {
text-align: center;
}
</style>
```{r, echo = FALSE, results = "asis"} ```{r, echo = FALSE, results = "asis"}
# browseURL("http://datatables.net/reference/option/") # browseURL("http://datatables.net/reference/option/")
# http://rstudio.github.io/DT/functions.html # http://rstudio.github.io/DT/functions.html
...@@ -212,14 +228,14 @@ dt <- datatable(data = subset(nt, select = v), ...@@ -212,14 +228,14 @@ dt <- datatable(data = subset(nt, select = v),
autoHideNavigation = TRUE, autoHideNavigation = TRUE,
escape = FALSE, escape = FALSE,
options = list( options = list(
searching = TRUE, searching = FALSE,
paging = FALSE, paging = FALSE,
pageLength = NULL, pageLength = NULL,
lengthMenu = NULL)) lengthMenu = NULL))
dt <- formatStyle(table = dt, dt <- formatStyle(table = dt,
columns = !(v %in% c("GRR", "F")), columns = !(v %in% c("GRR", "F")),
color = styleInterval(cuts = c(40, 70), color = styleInterval(cuts = c(39.999999, 69.999999),
values = c("#ff3300", values = c("#ff3300",
"gray", "gray",
"#3333ff"))) "#3333ff")))
...@@ -227,6 +243,13 @@ dt <- formatStyle(table = dt, ...@@ -227,6 +243,13 @@ dt <- formatStyle(table = dt,
is.decimal <- function(x) is.numeric(x) && !is.integer(x) is.decimal <- function(x) is.numeric(x) && !is.integer(x)
formatRound(table = dt, formatRound(table = dt,
columns = sapply(dt$x$data, is.decimal), columns = sapply(dt$x$data, FUN = is.decimal),
digits = 1) digits = 1)
``` ```
\* A média final é uma média ponderada da nota das sabatinas (peso 0.7)
e dos trabalhos (peso 0.3). Foram realizadas 9 sabatinas e 2 questões
bonus. Destas 11 notas, apenas as 6 maiores ($\left\lfloor 0.75 \times 9
\right\rfloor = 6$) foram consideradas para compor o desempenho nas
sabatinas. A nota do T2 foi lançada como 70 para todos os alunos apenas
para fins de simulação. Em breve, a nota correta será lançada.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment