2019-08-11 22:33:52 +00:00
|
|
|
|
|
|
|
# Overview
|
|
|
|
- **CVE/**: Contains actual `R` package.
|
|
|
|
- **CVE_legacy/**: Contains original (first) `R` implementatin of the CVE method.
|
|
|
|
The `*.R` and `*.cpp` files in the root directory are _development_ and _test_ files.
|
|
|
|
|
|
|
|
## TODO: README.md
|
2019-08-14 18:05:42 +00:00
|
|
|
|
|
|
|
# Package Structure
|
|
|
|
|
|
|
|
## Demos
|
|
|
|
A demo is an `.R` file that lives in `demo/`. Demos are like examples but tend to
|
|
|
|
be longer. Instead of focussing on a single function, they show how to weave
|
|
|
|
together multiple functions to solve a problem.
|
|
|
|
|
|
|
|
You list and access demos with `demo()`:
|
|
|
|
* Show all available demos: `demo()`.
|
|
|
|
* Show all demos in a package: `demo(package = "CVE")`.
|
|
|
|
* Run a specific demo: `demo("runtime_test", package = "CVE")`.
|
|
|
|
* Find a demo: `system.file("demo", "runtime_test.R", package = "CVE")`.
|
|
|
|
|
|
|
|
Each demo must be listed in `demo/00Index` in the following form:
|
|
|
|
`demo-name Demo description`.
|
|
|
|
The demo name is the name of the file without the extension,
|
|
|
|
e.g. `demo/runtime_test.R` becomes `runtime_test`.
|
|
|
|
|
|
|
|
By default the demo ask for human input for each plot: "Hit to see next plot".
|
|
|
|
This behaviour can be overridden by adding `devAskNewPage(ask = FALSE)` to
|
|
|
|
the demo file. You can add pauses by adding:
|
|
|
|
`readline("press any key to continue")`.
|
|
|
|
|
|
|
|
**Note**: Demos are not automatically tested by `R CMD check`. This means that they
|
|
|
|
can easily break without your knowledge.
|