R/RcppExports.R

Defines functions Xrexp mvrnormArma get_output_ex get_output get_sample_output set_input_var get_inputs get_all_events_matrix get_all_events get_events_by_type get_agent_events get_n_events get_event model_run init_session_internal deallocate_resources Cget_pointers allocate_resources create_agents get_smith get_agent get_progress get_runtime_stats get_agent_size_bytes get_settings set_settings_var

Documented in get_agent_events get_agent_size_bytes get_all_events get_all_events_matrix get_event get_events_by_type get_inputs get_n_events get_output get_output_ex get_progress get_runtime_stats get_sample_output get_settings get_smith mvrnormArma set_input_var set_settings_var

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

#' Sets model settings.
#' @param name a name
#' @param value a value
#' @return 0 if successful.
#' @export
set_settings_var <- function(name, value) {
    .Call(`_epicR_set_settings_var`, name, value)
}

#' Returns current settings.
#' @return current settings.
#' @export
get_settings <- function() {
    .Call(`_epicR_get_settings`)
}

#' Returns the size of agent struct in bytes
#' @return size of agent struct in bytes
#' @export
get_agent_size_bytes <- function() {
    .Call(`_epicR_get_agent_size_bytes`)
}

#' Returns run time stats.
#' @return agent size as well as memory and random variable fill stats.
#' @export
get_runtime_stats <- function() {
    .Call(`_epicR_get_runtime_stats`)
}

#' Returns current simulation progress.
#' @return Number of agents processed so far (last_id).
#' @export
get_progress <- function() {
    .Call(`_epicR_get_progress`)
}

get_agent <- function(id) {
    .Call(`_epicR_get_agent`, id)
}

#' Returns agent Smith.
#' @return agent smith.
#' @export
get_smith <- function() {
    .Call(`_epicR_get_smith`)
}

create_agents <- function() {
    .Call(`_epicR_create_agents`)
}

allocate_resources <- function() {
    .Call(`_epicR_allocate_resources`)
}

Cget_pointers <- function() {
    .Call(`_epicR_Cget_pointers`)
}

deallocate_resources <- function() {
    .Call(`_epicR_deallocate_resources`)
}

init_session_internal <- function() {
    .Call(`_epicR_init_session_internal`)
}

model_run <- function(max_n_agents) {
    .Call(`_epicR_model_run`, max_n_agents)
}

#' Returns the events stack.
#' @param i number of event
#' @return events
#' @export
get_event <- function(i) {
    .Call(`_epicR_get_event`, i)
}

#' Returns total number of events.
#' @return number of events
#' @export
get_n_events <- function() {
    .Call(`_epicR_get_n_events`)
}

#' Returns all events of an agent.
#' @param id agent ID.
#' @return all events of agent \code{id}
#' @export
get_agent_events <- function(id) {
    .Call(`_epicR_get_agent_events`, id)
}

#' Returns all events of a certain type.
#' @param event_type a number
#' @return all events of the type \code{event_type}
#' @export
get_events_by_type <- function(event_type) {
    .Call(`_epicR_get_events_by_type`, event_type)
}

#' Returns all events.
#' @return all events
#' @export
get_all_events <- function() {
    .Call(`_epicR_get_all_events`)
}

#' Returns a matrix containing all events
#' @return a matrix containing all events
#' @export
get_all_events_matrix <- function() {
    .Call(`_epicR_get_all_events_matrix`)
}

#' Returns inputs
#' @return all inputs
#' @export
get_inputs <- function() {
    .Call(`_epicR_get_inputs`)
}

#' Sets input variables.
#' @param name a string
#' @param value a number
#' @return 0 if successful
#' @export
set_input_var <- function(name, value) {
    .Call(`_epicR_set_input_var`, name, value)
}

#' Returns a sample output for a given year and gender.
#' @param year a number
#' @param sex a number, 0 for male and 1 for female
#' @return that specific output
#' @export
get_sample_output <- function(year, sex) {
    .Call(`_epicR_get_sample_output`, year, sex)
}

#' Main outputs of the current run.
#' @return number of agents, cumulative time, number of deaths, number of COPD cases, as well as exacerbation statistics and QALYs.
#' @export
get_output <- function() {
    .Call(`_epicR_get_output`)
}

#' Extra outputs from the model
#' @return Extra outputs from the model.
#' @export
get_output_ex <- function() {
    .Call(`_epicR_get_output_ex`)
}

#' Samples from a multivariate normal
#' @param n number of samples to be taken
#' @param mu the mean
#' @param sigma the covariance matrix
#' @return the multivariate normal sample
#' @export
mvrnormArma <- function(n, mu, sigma) {
    .Call(`_epicR_mvrnormArma`, n, mu, sigma)
}

Xrexp <- function(n, rate) {
    .Call(`_epicR_Xrexp`, n, rate)
}

Try the epicR package in your browser

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

epicR documentation built on March 8, 2026, 5:06 p.m.