The field-book experimental design was deployed with
inti
package https://inkaverse.com/articles/apps.html
library(inti)
<- data.frame(condition = c("irrigated", "drought")
treats genotypes = c("choclito", "salcedo", "pandela", "puno"))
,
<- tarpuy_design(data = treats
design nfactors = 2
, type = "rcbd"
, rep = 3
, barcode = "HUITO")
,
<- design$fieldbook
fb
%>% web_table() fb
The layer options can change dynamically based in a column. In the
following example the color of the text will change based in the
treatments: “blue” for irrigated
and “red” for
drought
.
You can find more fonts in https://fonts.google.com/
library(huito)
<- c('Ceviche One', "Permanent Marker")
font
huito_fonts(font)
<- fb %>%
label mutate(color = case_when(
%in% "irrigated" ~ "blue"
condition %in% "drought" ~ "red"
, condition %>%
)) label_layout(size = c(10, 2.5)
border_color = "blue"
, %>%
) include_image(
value = "https://flavjack.github.io/inti/img/inkaverse.png"
size = c(2.4, 2.4)
, position = c(1.2, 1.25)
, opts = "image_scale(200)"
, %>%
) include_barcode(
value = "barcode"
size = c(2.5, 2.5)
, position = c(8.2, 1.25)
, %>%
) include_text(value = "plots"
position = c(9.7, 1.25)
, angle = 90
, size = 15
, color = "red"
, %>%
) include_text(value = "Inkaverse"
position = c(4.6, 2)
, size = 30
, color = "brown"
, 1]
, font[%>%
) include_text(value = "condition"
position = c(4.6, 1.2)
, size = 13
, color = "color" # dynamic column
, 2]
, font[%>%
) include_text(value = "genotypes"
position = c(4.6, 0.5)
, size = 13
, color = "#009966"
, 2]
, font[ )
You should comment huito_fonts()
after the first running
as we already imported the fonts.
The preview mode label_print(mode = "preview")
generate
a example of the label design from a random row of the data set.
%>%
label label_print(mode = "preview")
If you want generate the complete labels list, change:
label_print(mode = "complete")
.
%>%
label label_print(mode = "complete", filename = "etiquetas", nlabels = 10)