Description Usage Arguments Value Methods (by generic) Examples
The function region()
is the constructor function for the
homonymous class.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | ## S3 method for class 'region'
get_p_accept(x, ...)
## S3 method for class 'region'
get_offered(x, ...)
## S3 method for class 'region'
get_p_default(x, ...)
## S3 method for class 'region'
get_state(x, ...)
## S3 method for class 'region'
get_region(x, ...)
## S3 method for class 'region'
get_regions(x, ...)
## S3 method for class 'region'
get_all_region(x, ...)
## S3 method for class 'region'
get_centers(x, ...)
region(centers, default_p = 1)
## S3 method for class 'region'
print(x, ...)
|
x |
an object used to select a method. |
... |
further arguments passed to or from other methods. |
centers |
[lst] a list of objects of class |
default_p |
[dbl] a single number between 0 and 1 (possibly
included) representing the default probability for the centers in the
region (if not explicitelly specified in the |
An object of class region
.
get_p_accept
: compute the probability that at least one center in
in the region accept an offered organ.
get_offered
: wrapper function to access to the detail "offered".
get_p_default
: wrapper function to access to the detail "default_p".
get_state
: wrapper function to access to the detail "state".
get_region
: wrapper function to access to the detail "state".
get_regions
: wrapper function to access to the region itself.
get_all_region
: wrapper function to access to the detail "region".
get_centers
: wrapper function to access to the detail "centers".
print
: nice (and coloured, if supported) print method.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | pavia <- center('Pavia', 'Lombardia', 10, 0.8)
bergamo <- center('Bergamo', 'Lombardia', 10, 0.5)
milano <- center('Milano', 'Lombardia', 10)
lombardia <- region(set_centers(pavia, bergamo, milano), default_p = 0.2)
get_p_accept(lombardia)
get_offered(lombardia)
get_p_default(lombardia)
get_state(lombardia) # italy
get_state(lombardia) # italy
get_regions(lombardia)
get_all_region(lombardia) # lombardia
get_centers(lombardia)
pavia <- center('Pavia', 'Lombardia', 10, 0.8)
bergamo <- center('Bergamo', 'Lombardia', 10, 0.5)
milano <- center('Milano', 'Lombardia', 10)
lombardia <- region(set_centers(pavia, bergamo, milano), default_p = 0.2)
pavia
bergamo
milano
lombardia
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.