library(readxl)
library(tidyr)
library(dplyr)
fig2I <- read_xlsx("20200121_npod_fig2_data.xlsx", sheet = "Figure 2I", cell_rows(3:31)) %>%
pivot_longer(c(T2D, Healthy), names_to = "group", values_to = "H3K27me3", values_drop_na = T) %>%
rename(ID = nPOD_ID) %>%
transmute(ID = as.integer(gsub("[^0-9]", "", ID)),
H3K27me3 = as.numeric(gsub("[^(0-9)\\.]", "", H3K27me3)))
fig2J <- read_xlsx("20200121_npod_fig2_data.xlsx", sheet = "Figure 2J", cell_rows(3:31), col_types = "text") %>%
pivot_longer(c(2:3), names_to = "group", values_to = "H3K27me3.acinar", values_drop_na = T) %>%
rename(ID = nPOD_ID) %>%
transmute(ID = as.integer(gsub("[^0-9]", "", ID)),
H3K27me3.acinar = as.numeric(gsub("[^(0-9)\\.]", "", H3K27me3.acinar)))
dataset <- full_join(fig2I, fig2J, by = "ID")
write.table(dataset, "PMID29754954_Lu-2018.tsv", sep = "\t", quote = F, row.names = F)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.