repeat_sub | R Documentation |
Repeat table subheadings in a new column
repeat_sub(x, column = "subheading", first = TRUE)
x |
a tibble with subheadings |
column |
new column name, default subheading |
first |
add subheader as first column, default TRUE |
Identifies subheadings in a data frame by checking for rows with a non-empty first column and all other columns are empty. Removes subheader rows and repeats values down a new column.
a tibble
Chris Stubben
x <- data.frame(
genes = c("Up", "aroB", "glnP", "Down", "ndhA", "pyrF"),
fold_change = c(NA, 2.5, 1.7, NA, -3.1, -2.6)
)
x
repeat_sub(x)
repeat_sub(x, "regulated", first = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.