gglm: Linear regression of two continuous variables with addition...

Description Usage Arguments Value Author(s) Examples

View source: R/gglm.R

Description

Linear regression of two continuous variables with addition of R2 and p-value

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
gglm(
  data = iris,
  x = "Petal.Length",
  y = "Petal.Width",
  group = NULL,
  facet = TRUE,
  label.x = "left",
  label.y = "top",
  size = 14,
  show.se = TRUE
)

Arguments

data

a data frame containing all the variables and the grouping information

x

a variable in the x-axis

y

a variable in the y-axis

group

the grouping information

facet

a boolean value to indicate facet

label.x

the x position of label or can be "left" or "right" means the range of [0, 1]

label.y

the y position og label or can be "bottom" or "top" means the range of [0, 1]

size

the text size for ggtheme::theme_size function, default value is 14

show.se

a boolean value to indicate whether shown the SE

Value

a ggplot2 plot

Author(s)

Zhonghui Gai

Examples

1
2
3
4
5
6
7
8
gglm(group = "Species", label.y = c(1,1,75,2.6)) + ggsci::scale_color_aaas()
gglm(group = "Species", label.y = 0.99) + ggsci::scale_color_aaas() + gglm:::theme_pub()
gglm() + ggpubr::theme_pubr()
gglm() + egg::theme_article()
gglm() + ggprism::theme_prism()
gglm(group = "Species", label.y = 0.99) + ggsci::scale_color_aaas() + ggprism::theme_prism()
gglm(group = "Species", label.y = 0.99) + ggprism::theme_prism(base_size = 14) +
ggprism::scale_color_prism(palette = "floral")

ZhonghuiGai/gglm documentation built on Dec. 18, 2021, 8:28 p.m.