setup_knitr()
registers a knitr hook to make it easy to use vcr inside a
vignette. First call setup_knitr()
in your setup chunk (or other chunk
early in the document):
Then, in a chunk where you want to use a cassette, set the cassette
chunk
option to the name of the cassette:
Arguments
- prefix
An prefix for the cassette name to make cassettes unique across vignettes. Defaults to the file name (without extension) of the currently executing vignette.
- dir
Directory where to create the cassette file. Default: `"_vcr"“.
- ...
Other arguments passed on to
insert_cassette()
.