library(qrlabelr)
df <- data.frame(LOCATION = rep("BAMBEY", 5),
PLOT = 1001:1005,
ROW = c(rep(1, 3), rep(2, 2)),
COLUMN = c(1:3, 1:2),
REP = rep(1, 5),
IBLOCK = c(rep(1, 3), rep(2, 2)),
TREATMENT = paste0("G-", 1:5),
SEED_SOURCE = rep("OFF_NUR", 5))
df$ids <- paste0(df$LOCATION,'2023', '_PYT', '_', df$PLOT, '_', df$ROW, '_',
df$COLUMN)
file <- tempfile()
# \donttest{
if(file.exists(file))
gp_label(dat = df,
wdt = 5,
hgt = 2,
page_wdt = 8.5,
page_hgt = 11,
top_mar = 0.75,
bot_mar = 0.75,
left_mar = 1.75,
right_mar = 1.75,
numrow = 4L,
numcol = 1L,
filename = file,
font_sz = 20,
rname = "Adoma",
get_unique_id = "custom",
unique_id = 'ids',
family = "sans",
top_left_txt1 = 'Plot:',
top_left_txt2 = 'Row:',
top_right_txt1 = 'Rep:',
top_right_txt2 = 'Col:',
center_right_txt1 = 'iBlock:',
center_right_txt2 = 'Seed:',
center_right_txt3 = 'Adoma',
top_left_id1 = 'PLOT',
top_left_id2 = 'ROW',
top_right_id1 = 'REP',
top_right_id2 = 'COLUMN',
center_right_id1 = 'IBLOCK',
center_right_id2 = 'SEED_SOURCE',
bottom_left_id1 = 'ids',
bottom_left_id2 = 'TREATMENT',
ec_level = 1)
# }
Run the code above in your browser using DataLab