Internal NMOF functions
Several internal functions, not exported from the NMOF name space.
makeInteger(x, label, min = 1L) anyNA(x) checkList(passedList, defaultList, label = "'algo'") mRU(m,n) mRN(m,n) mcList(mc.control) repair1c(x, up, lo) Chapters1 Chapters2 due(D, tauD, tau, q)
makeInteger
coerces the scalar x
to integer. If the
result is NA
or smaller than min
, an error is issued.
anyNA
gives TRUE
if any(is.na(x))
, else
FALSE
. If x
is a function or NULL
, it also
gives FALSE
.
checkList
will issue an error if passedList
contains any
NA
elements. It will give a warning if any elements in
passedList
are unnamed, or if an element in
names(passedList)
is not found in names(defaultList)
.
mRU
and mRN
create matrices (of size m
times
n
) of uniform/Gaussian variates.
mcList
takes a list of named elements and ‘merges’ them with
the default settings of mclapply
from package parallel.
repair1c
is described in the vignette on ‘Repairing
Solutions’.
Chapters[12]
is a vector of length 15, giving the chapter names as
printed in the book. (Can be accessed with showChapterNames
.)
due
(dividends until expiry) returns a list with named
components tauD
and D
: all dividends for which
time-to-payment is greater than zero, but less than or equal to
time-to-expiry.
Enrico Schumann
Gilli, M., Maringer, D. and Schumann, E. (2019) Numerical Methods and Optimization in Finance. 2nd edition. Elsevier. https://www.elsevier.com/books/numerical-methods-and-optimization-in-finance/gilli/978-0-12-815065-8
Schumann, E. (2019) Financial Optimisation with R (NMOF Manual). http://enricoschumann.net/NMOF.htm#NMOFmanual
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.