-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreport_template.Rmd
More file actions
37 lines (32 loc) · 892 Bytes
/
report_template.Rmd
File metadata and controls
37 lines (32 loc) · 892 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
---
title: "Informe de Resultados"
output: html_document
params:
dataset: NULL
atributo: NULL
---
```{r setup, include=FALSE}
library(knitr)
dataset <- params$dataset
atributo <- params$atributo
archivo_tabla <- file.path("output", paste0(dataset, "_", atributo, "_top50_results.csv"))
archivo_imagen <- file.path("output", paste0(dataset, "_", atributo, "_volcano_plot.png"))
```
## Tabla de Resultados
```{r tabla, echo=FALSE}
if (file.exists(archivo_tabla)) {
tabla <- read.csv(archivo_tabla, stringsAsFactors = FALSE)
tabla[] <- lapply(tabla, function(x) if(is.numeric(x)) formatC(x, format = "e", digits = 4) else x)
knitr::kable(tabla)
} else {
cat("Archivo de resultados no encontrado.")
}
```
## Gráfico Volcano Plot
```{r imagen, echo=FALSE}
if (file.exists(archivo_imagen)) {
knitr::include_graphics(archivo_imagen)
} else {
cat("Imagen no disponible.")
}
```