Configuración
source("https://lozanoisla.com/setup.r")
url <- paste0("https://docs.google.com/spreadsheets/d/"
, "1QziIXGOwb8cl3GaARJq6Ez6aU7vND_UHKJnFcAKx0VI")
gs <- as_sheets_id(url)
# browseURL(url)
xl <- gs %>%
drive_download("files/fieldbook.xlsx", overwrite = T) %>%
pluck(2)
fb <- xl %>%
readxl::read_excel("prosopis") %>%
rename_with(tolower) %>%
mutate(across(c("rep", "nacl", "temp"), ~ as.factor(.) )) %>%
mutate(across(where(is.factor), ~ gsub("[[:space:]]", "", .)) ) %>%
as.data.frame()
# str(fb)
codigo
Tablas
tab <- gs %>%
range_read("prosopis") %>%
select(rep:D5) %>%
head(10) %>%
inti::info_table(
caption = "Germination dataset import from a googlesheet"
, notes = "@schafleitner2007")
tab %>% inti::include_table()
#> cite: (Table \@ref(tab:chunk))
Figuras
gerplot <- cowplot::plot_grid(gbp, ggt
, nrow = 1
, labels = "AUTO")
save_plot("files/fig_gerplot.png",
plot = gerplot,
dpi= 300,
base_height = 100,
base_aspect_ratio = 2.5,
units = "mm")
fig <- info_figure(
caption = "Germination experiment with *Prosopis juliflor* under different osmotic potentials and temperatures."
, notes = "A) Bar graph with germination percentage in a factorial analisys. B) Line graph from cumulative germination under different osmotic potentials."
, label = "__Where:__"
, url = "files/fig_gerplot.png"
)
fig %>% include_figure()
#> cite: (Figure \@ref(fig:chunk))
#> caption: fig.cap= fig$caption
Articul8
file <- list.files(pattern = '*.zip')
unzip(file, overwrite = T)
list <- unzip(file, list = T)$Name
md <- grep("md$", list)
path <- list[md]
file.rename(path, "manuscript.Rmd")
#> title:  
#> include=FALSE
#> child = "manuscript.Rmd"
#> unlink("manuscript.Rmd")
Cover page
#> yaml
params:
user: 'Flavio Lozano Isla'
title: '" Title"'
logo: !r if (!knitr:::is_html_output()) knitr::include_graphics('files/logo.png')
uni: 'Universidad Nacional Agraria la Molina'
facu: 'Facultad de Agronomía'
type: 'Tesis para optar el título de ingeniero Agrónomo'
date: !r if (knitr:::is_html_output()) {format(Sys.time(), '%d %b %Y %X')}
place: 'Lima-Perú'
year: '2021'
#> Doc body
:::{custom-style="uni"}
`r params$uni`
:::
:::{custom-style="facu"}
`r params$facu`
:::
:::{custom-style="logo"}
`r params$logo`
:::
:::{custom-style="title"}
`r params$title`
:::
:::{custom-style="type"}
`r params$type`
:::
:::{custom-style="user"}
`r params$user`
:::
:::{custom-style="place"}
`r params$place`
:::
:::{custom-style="year"}
`r params$year`
:::
\newpage