R/add_point_to_graph.R

Defines functions add_point_to_graph

add_point_to_graph <- function(
    graph,
    fit,
    name = "est.incidence",
    point_data =
      tibble(
        x = fit$estimate %>% exp(),
        y = log_likelihood(.data$x, ...),
        label = "est.incidence"
      ),
    ...) {
  graph <-
    graph +
    ggplot2::geom_point(
      data = point_data,
      ggplot2::aes(x = .data$x, y = .data$y, col = .data$label)
    )
}

Try the serocalculator package in your browser

Any scripts or data that you put into this service are public.

serocalculator documentation built on April 3, 2025, 7:35 p.m.