https://github.com/mccarthy-m-g/embedr
An R package for embedding multimedia files in HTML documents.
https://github.com/mccarthy-m-g/embedr
audio embedding-multimedia-files html-documents knitr pandoc r r-package rmarkdown video
Last synced: about 1 year ago
JSON representation
An R package for embedding multimedia files in HTML documents.
- Host: GitHub
- URL: https://github.com/mccarthy-m-g/embedr
- Owner: mccarthy-m-g
- License: other
- Created: 2020-04-15T22:52:44.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-07-09T07:54:56.000Z (almost 6 years ago)
- Last Synced: 2025-02-14T13:15:15.104Z (over 1 year ago)
- Topics: audio, embedding-multimedia-files, html-documents, knitr, pandoc, r, r-package, rmarkdown, video
- Language: R
- Homepage:
- Size: 1.01 MB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.Rmd
- Changelog: NEWS.md
- License: LICENSE
Awesome Lists containing this project
README
---
output: github_document
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# embedr
[](https://github.com/mccarthy-m-g/embedr/actions)
An R package for embedding multimedia files in HTML documents.
## Installation
embedr is not yet available on CRAN but you can install it from this repository:
```r
# Install devtools package if necessary
if(!"devtools" %in% rownames(installed.packages())) install.packages("devtools")
# Install the stable development version from GitHub
devtools::install_github("mccarthy-m-g/embedr")
```
## Example
Embed audio with `embed_audio()`:
```{r audio example, eval=FALSE}
library(embedr)
# embed .mp3 file
audio <- "https://michaelmccarthy.netlify.app/files/embedr/audio-vignette.mp3"
embed_audio(audio)
```
Embed video with `embed_video()`:
```{r video example, eval=FALSE}
library(embedr)
# embed .mp4 video
video <- "https://michaelmccarthy.netlify.app/files/embedr/video-vignette.mp4"
embed_video(video, width = "256", height = "256")
```