Description Usage Arguments Examples
Generates labels for insect specimens, and add UUIDs within QR codes
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
label_df |
dataframe, specifying label data, usually associated with collecting-event or determination. Each row should include data for each unique label. |
n |
intiger vector, indicating the number of labels to be plotted for each row in the dataframe |
filename |
a string specifying the output PDF file name |
text_order |
a list of integers, and/or vector of integers, specifying which data to include in what order. Each element of the list represent one label-line, chronologically ordered. E.g. list(c(1, 2),c(3,4),c(5,6), 7, 8, 9), where 1 is first column of input data, 2 is second etc. |
x |
an integer specifying number of rows of labeles on each page |
y |
an integer specifying number of columns of labels on each page |
QR_data |
an integer or vector of integers specifying what data to store in QR-codes, where 1 is UUID, 2 is first column of input data, 3 is second etc. E.g. c(1,2,8) |
fontsize |
a numerical value, or a vecotor of numerical values, specifying font size. A vector have to correspond in length to the number of label text-lines |
linedist |
a numerical value specifying line distance |
family |
a string, or a vector of strings, specifying one of the default font families (or other PostScript emulator fonts). A vector have to correspond in length to the number of label text-lines |
font |
an integer, or a vector of integers, specifying font type of each label line, where 1 is plain, 2 bold, 3 italic and 4 is bold-italic. A vector have to correspond in length to the number of label text-lines |
tx |
a numerical value specifying text offset on the x plane |
ty |
a numerical value specifying text offset on the y plane |
QRd |
a numerical value specifying distance between QR-codes (This will also determine QR code size) |
QRx |
a numerical value specifying QR code offset on the x plane |
QRy |
a numerical value specifying QR code offset on the y plane |
delim |
a string specifying a delimiter between data segments in the QR codes (if more than one) |
width |
a numerical value specifying PDF width (inches) |
height |
a numerical value specifying the PDF height (inches) |
qrlevel |
an integer value between 0 and 3 specifying the QR error correction level |
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 | example_input <- data.frame(
col_ID = c("JPL_001", "JPL_002", "JPL_003"),
country = c("Norway,", "Norway,", "Norway,"),
county = c("Nordland,", "Troms,", "Troms,"),
municipality = c("Grane:", "Tromsø:", "Målselv:"),
locality1 =c("Auster Vefsna", "Tønsvik", "Dividalen"),
locality2 = c("Stilleelva", "Tverrelva", "Kvennelva"),
lat = c(65.532188, 69.736644, 68.792052),
lon = c(13.728252, 19.178893, 19.695974),
habitat = c("River-shore", "River-shore", "River-shore"),
method = c("Sweep-net:", "Sweep-net:", "Sweep-net:"),
date = c("2018-07-29", "2018-08-01", "2018-08-10"),
leg = c("Leg. J. Kjærandsen", "Leg. J.P.Lindemann", "Leg. J.P.Lindemann")
)
insectlabel(
label_df = example_input,
n = c(20,15,25),
filename = "example_labels.pdf",
text_order = list(c(2, 3, 4), c(5, 6), c(7, 8), c(9), c(10, 11), 12),
x = 55,
y = 15,
QR_data = c(2,1),
fontsize = 3.3,
linedist = 0.95,
tx = 11,
ty = -1,
QRd = 4,
QRx = 4.4,
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.