media_assign | R Documentation |
Searches for media files in folders and assigns the links to transcript objects in a corpus. The function uses the name of the transcript to find the media files, e.g. the function assumes that the annotation files have the same name as the media files, except from the suffix/the file type.
media_assign(
x,
searchPaths = NULL,
searchInSubfolders = TRUE,
filterFile = "",
transcriptNames = NULL,
deleteExistingMedia = TRUE,
onlyUniqueFiles = TRUE
)
x |
Corpus object. |
searchPaths |
Vector of character strings; paths where media files should be searched; if path is not defined, the paths given in |
searchInSubfolders |
Logical; if |
filterFile |
Character string; Regular expression of files to look for. |
transcriptNames |
Vector of character strings; Names of the transcripts for which you want to search media files; leave empty if you want to search media for all transcripts in the corpus object. |
deleteExistingMedia |
Logical; if |
onlyUniqueFiles |
Logical; if |
Only the the file types set in options()$act.fileformats.audio
and options()$act.fileformats.video
will be recognized.
You can modify these options to recognize other media types.
Corpus object.
media_delete, media_getPathToExistingFile
library(act)
# Set the folder(s) where your media files are located in the corpus object
# Please be aware that that the example corpus that comes with the package
# does NOT contain media files. Please download the entire example corpus
# with media files if you want to use this function reasonably.
examplecorpus@paths.media.files <- c("", "")
examplecorpus <- act::media_assign(examplecorpus)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.