Description Usage Arguments Details Value Note Author(s) References Examples
Display the code examples from ‘Numerical Methods and Optimization and Finance’.
1 2 3 | showExample(file = "", chapter = NULL, showfile = TRUE,
includepaths = FALSE, ...)
showChapterNames()
|
file |
a character vector of length one. See Details. |
chapter |
optional: a character vector of length one, giving the chapter name
(see Details), or an integer, indicating a chapter number. Default
is |
showfile |
Should the file be displayed with |
includepaths |
Should the file paths be displayed? Defaults to |
... |
Arguments passed to |
showExample
matches the specified file argument against the
available file names via grepl(file, filenames, ...)
. If
chapter
is specified, a second match is performed,
grepl(chapter, chapternames, ...)
. The chapternames
are
those in the book (eg, ‘Modeling dependencies’). The selected
files are then those for which file name and chapter name could be
matched.
showExample
returns a data.frame
of at least two
character vectors, Chapter and File. If includepaths
is
TRUE
, Paths are included. If no file is found, the
data.frame
has zero rows. If a single file is identified
and showfile
is TRUE
, the function has the side effect
of displaying that file.
showChapterNames
returns a character vector of length 15: the
names of the book's chapters.
The files can also be downloaded from http://nmof.net .
Enrico Schumann
Gilli, M., Maringer, D. and Schumann, E. (2011) Numerical Methods and Optimization in Finance. Elsevier. http://www.elsevierdirect.com/product.jsp?isbn=9780123756626
1 2 3 4 5 6 7 | showExample("equations.R")
showExample("example", chapter = "portfolio")
showExample("example", chapter = "Portfolio")
showExample("example", chapter = "portfolio", ignore.case = TRUE)
showExample("example", chapter = 13)
showExample("example", chapter = showChapterNames()[13L])
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.