function_from_user: List functions from user

View source: R/function_from_user-function.R

function_from_userR 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)

rcausim documentation built on June 24, 2024, 5:06 p.m.