R/RcppExports.R

Defines functions convertRawReports2TablesRcpp midPFisherTestGreater fisherTestGreater

Documented in convertRawReports2TablesRcpp

# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

fisherTestGreater <- function(a, b, c, d) {
    .Call('_pvm_fisherTestGreater', PACKAGE = 'pvm', a, b, c, d)
}

midPFisherTestGreater <- function(a, b, c, d) {
    .Call('_pvm_midPFisherTestGreater', PACKAGE = 'pvm', a, b, c, d)
}

#' Create 2 x 2 Tables
#'
#' Creates a data frame containing all 2 x 2 contingency tables
#' given a raw spontaneous reporting (SR) data set. An SR data set
#' is a binary matrix, where each row is a report. The first
#' columns represent the presence or absence of a drug, the
#' The other columns represent the presence or absence of an event.
#' See for more information the wrapper function,
#' \code{\link{convertRawReports2Tables}}.
#'
#' The code is a simplified version of the function \code{create2x2TablesRcpp}
#' in the \code{SRSim} package.
#'
#' @param reports A binary matrix. Each row is a report
#' @param n_drugs The number of drugs
#' @param n_events The number of events
#'
#' @return A dataframe. A description of the columns can be found in the commentary
#'         for the function \code{\link{convertRawReports2Tables}}
#'
#' @seealso \code{\link{convertRawReports2Tables}}
convertRawReports2TablesRcpp <- function(reports, n_drugs, n_events) {
    .Call('_pvm_convertRawReports2TablesRcpp', PACKAGE = 'pvm', reports, n_drugs, n_events)
}
bips-hb/pvm documentation built on Dec. 14, 2020, 9:31 a.m.