center: Constructor for object of class 'center'

Description Usage Arguments Value Methods (by generic) Examples

View source: R/center.R

Description

The function center() is the constructor function for the homonymous class.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
center(name, region, offered = 0L, p_accept = NA, state = "italy")

## S3 method for class 'center'
print(x, ...)

## S3 method for class 'center'
get_center(x, ...)

## S3 method for class 'center'
get_region(x, ...)

## S3 method for class 'center'
get_p_accept(x, ...)

## S3 method for class 'center'
get_offered(x, ...)

## S3 method for class 'center'
get_state(x, ...)

Arguments

name

[chr] the name of the (city) transplant center.

region

[chr] The name of the (Italian) region in which the center inherits (see regions).

offered

[dbl] a single number between 0 and 1 (possibly included) representing the number of organ offered from the center in the previous period of reference. Default is 0.

p_accept

[dbl] a single number between 0 and 1 (possibly included) representing the probability to accept an offered organ. Default is NULL meaning that the probability should be considered at region level and not at center level.

state

[chr] a name of available state, i.e. included in names(regions) (note: both lowercase and Titlecase are fine for write states, i.e. "Italy" works as well as "italy").

x

an object used to select a method.

...

further arguments passed to or from other methods.

Value

An object of class center.

Methods (by generic)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
center('Padova', 'Veneto', 10, 0.8)
center('Padova', 'Veneto', 10, 0)
center('Padova', 'Veneto', 10)
center('Padova', 'Veneto', 10, 0.8, 'Italy')

padova <- center('Padova', 'Veneto')
get_center(padova) # Padova
get_region(padova) # veneto
get_p_accept(padova)
get_offered(padova)
get_state(padova) # italy

UBESP-DCTV/clumpr documentation built on July 3, 2021, 11:23 p.m.