View source: R/search_cuts_printtranscript.R
search_cuts_printtranscript | R Documentation |
Print transcripts in the style of conversation analysis will be created for each search result.
The transcripts will be inserted into the column defined in s@cuts.column.printtranscript
.
All transcripts will be stored in s@cuts.printtranscripts
.
search_cuts_printtranscript(
x,
s,
cutSpanBeforesec = NULL,
cutSpanAftersec = NULL,
l = NULL,
outputFolder = NULL
)
x |
Corpus object. |
s |
Search object. |
cutSpanBeforesec |
Double; Start the cut some seconds before the hit to include some context; the default NULL will take the value as set in @cuts.span.beforesec of the search object. |
cutSpanAftersec |
Double; End the cut some seconds before the hit to include some context; the default NULL will take the value as set in @cuts.span.beforesec of the search object. |
l |
Layout object. |
outputFolder |
Character string; if parameter is not set, the print transcripts will only be inserted in |
If you want to modify the layout of the print transcripts, create a new layout object with mylayout <- methods::new("layout")
, modify the settings and pass it as argument l
.
Search object;
library(act)
# Search
mysearch <- act::search_new(examplecorpus, pattern="yo")
# Create print transcripts for all search results
test <- act::search_cuts_printtranscript (x=examplecorpus, s=mysearch)
# Display all print transcripts on screen from @cuts.printtranscripts
cat(test@cuts.printtranscripts)
# Display all print transcripts from results data frame
cat(test@results[,mysearch@cuts.column.printtranscript])
cat(test@results[,mysearch@cuts.column.printtranscript])
# Only single print transcript from results data frame
cat(test@results[1,mysearch@cuts.column.printtranscript])
# Create print transcript snippets including 1 sec before and 5 sec after
mysearch@cuts.span.beforesec =1
mysearch@cuts.span.aftersec = 5
test <- act::search_cuts_printtranscript (x=examplecorpus,
s=mysearch)
# Display all transcript snippets on screen
cat(test@results[,mysearch@cuts.column.printtranscript])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.