data_pat | R Documentation |
Create random data for test functions
data_pat(x, group, n, sd, ...)
x |
the mean value of the variables |
group |
a character containing the names of group |
n |
a integer, the numbers of value in each group, used for mean |
sd |
the sd of mean function, default value is 0.1, which will affect the error bar |
a data frame
Zhonghui Gai
data_pat(x = c(24, 35, 46), group = c("C", "T", "L")) lst <- list(w1 = c(1, 2, 3, 4), w2 = c(5, 6, 7, 8), w3 = c(9, 10, 11, 12)) data <- data_pat(x = lst, group = c("C", "T", "L", "B"), n = 10, sd = 0.1) aggregate(. ~ group, data = data, mean) pat_barplot(data, variable = "w1") + ggpub::add_signif(comparisons = list(c("C", "T"), c("T", "L")), y_position = c(3, 4)) + ylab(bquote(bold(paste("TNF ",alpha^2," (pg/mL)")))) pat_point(data, fun = mean_se) + ylab(bquote(As (mu~mol ~CO[2]~ s^-1))) + annotate("text", x = c(2, 3), y = c(3, 7), label = c("***", "**"), size = 6) + theme(legend.position = c(0.5, 0.1))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.