Description Usage Arguments Examples
View source: R/read_subtitles.R
Convert an R object to a subtitles
object
1 2 3 4 5 6 7 8 9 10 | as_subtitle(x, format = "auto", clean.tags = TRUE,
metadata = data.frame(), frame.rate = NA, encoding = "auto", ...)
## Default S3 method:
as_subtitle(x, format = "auto", clean.tags = TRUE,
metadata = data.frame(), frame.rate = NA, encoding = "auto", ...)
## S3 method for class 'character'
as_subtitle(x, format = "auto", clean.tags = TRUE,
metadata = data.frame(), frame.rate = NA, encoding = "auto", ...)
|
x |
an R object that can be coerced into a |
format |
a character string specifying the format of the subtitles.
Four formats can be read: |
clean.tags |
logical. If |
metadata |
a one-row dataframe or tibble, or any object that can be coerced
into a one-row tibble by |
frame.rate |
a numeric value giving the frame rate in frames per second. Only relevant for MicroDVD format.
If |
encoding |
the name of the encoding to be used. Default is " |
... |
passed on to downstream methods. |
1 2 3 4 5 6 7 8 9 10 11 | as_subtitle(
c("WEBVTT",
"X-TIMESTAMP-MAP=MPEGTS:181083,LOCAL:00:00:00.000",
"",
"3",
"00:00:21.199 --> 00:00:22.333", ">> FEMALE SPEAKER:",
"Don't stay up too late.",
"",
""
), format = "webvtt"
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.