function_from_user {rcausim}R Documentation

List functions from user

Description

List functions from user

Usage

function_from_user(func)

Arguments

func

Functions, a list of functions which are defined by a user. The list must be non-empty. All elements of the list must be named. All elements of the list must be functions. The list must construct 1 edge or more.

Value

A list of functions. It can be an input for generating the simulated data, or redefined by a user using define function.

Examples


function_B <- function(n){ rnorm(n, mean = 90, sd = 5) }
function_A <- function(B){ ifelse(B>=95, 1, 0) }
functions <- list(A = function_A, B = function_B)
functions <- function_from_user(functions)

[Package rcausim version 0.1.1 Index]