R/crudeSequenceRatio.R

Defines functions crudeSequenceRatio

### CSR
crudeSequenceRatio <- function(table) {

  n_index_before_marker <- table |>
    dplyr::pull("index_first") |>
    sum()
  n_marker_before_index <- table |>
    dplyr::pull("marker_first") |>
    sum()

  crudeSequenceRatio <- n_index_before_marker / n_marker_before_index

  return(crudeSequenceRatio)

}

Try the CohortSymmetry package in your browser

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

CohortSymmetry documentation built on April 3, 2025, 5:26 p.m.