parameters_gg {agriutilities}R Documentation

Genetic Gain Parameters

Description

Genetic Gain Parameters

Usage

parameters_gg(model, trait = "trait")

Arguments

model

Linear regression model (lm object)

trait

A character string indicating the column in data that contains trials.

Value

A data.frame with some parameters from the linear regression (Slope, se_Slope, Intercept, r2, Pr(>F)) and the percentage of Genetic Gain.

Examples


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")


[Package agriutilities version 1.2.0 Index]