Description Usage Arguments Details Value Author(s) See Also Examples
Repeat the rows for certain times based on the number specified in the column NUMBER_OF_LABELS_TO_CREATE
.
1 | repeat_rows(dat = NULL)
|
dat |
A dataframe with a column |
This function helps to create multiple labels for one collector's number. Its output can then be supplied to the function 'herbarium_label()' to generate labels. For NUMBER_OF_LABELS_TO_CREATE
, any missing values (NA) will be replaced by 1. Anything in NUMBER_OF_LABELS_TO_CREATE
that could not be converted into a number, will be treated as NA, but not being replaced.
A dataframe with rows repeated for a certain number of times as specified in NUMBER_OF_LABELS_TO_CREATE
. Note all the values will be converted to characters.
Jinlong Zhang
1 2 3 4 5 6 7 8 9 | ### Just an Example
ddd <- c(LETTERS[1:19], "code")
dim(ddd) <- c(4, 5)
ddd
ddd <- data.frame(ddd)
ddd
ddd2 <- cbind(ddd, NUMBER_OF_LABELS_TO_CREATE = c(2, NA, "A", 5))
ddd2
repeat_rows(ddd2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.