parameters_gg | R Documentation |
Genetic Gain Parameters
parameters_gg(model, trait = "trait")
model |
Linear regression model ( |
trait |
A character string indicating the column in data that contains trials. |
A data.frame with some parameters from the linear regression (Slope, se_Slope, Intercept, r2, Pr(>F)) and the percentage of Genetic Gain.
library(ggplot2)
library(agridat)
library(magrittr)
library(agriutilities)
data(baker.barley.uniformity)
dat <- baker.barley.uniformity
head(dat)
model <- lm(yield ~ year, dat)
dat %>%
na.omit() %>%
ggplot(
aes(x = year, y = yield)
) +
geom_point() +
geom_smooth(method = "lm") +
theme_bw()
parameters_gg(model = model, trait = "yield")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.