Learn R Programming

vcr (version 1.6.0)

as.cassette: Coerce names, etc. to cassettes

Description

Coerce names, etc. to cassettes

Coerce to a cassette path

Usage

as.cassette(x, ...)

as.cassettepath(x)

Value

a cassette of class Cassette

Arguments

x

Input, a cassette name (character), or something that can be coerced to a cassette

...

further arguments passed on to cassettes() or [read_cassette_meta()

Examples

Run this code
if (FALSE) {
vcr_configure(dir = tempfile())
insert_cassette("foobar")
cassettes(on_disk = FALSE)
cassettes(on_disk = TRUE)
as.cassette("foobar", on_disk = FALSE)
eject_cassette() # eject the current cassette

# cleanup
unlink(file.path(tempfile(), "foobar.yml"))
}

Run the code above in your browser using DataLab