Usage
codingBySearch(pattern, fid = getFileIds(), cid, seperator="", ...)
- pattern
{
a text string, to be matched to the text in the RQDA project file
}
- fid
{
File id, in the GUI 'File' tab click on file to see its id
}
- cid
{
Code id, in the GUI 'Codes' tab click on code to see its id
}
- seperator
{
single character string, specifying the seperator of unit of analysis.
}
- ...
{
arguments passed to gregexpr
}
The function can be used if on is interested in automatically applying a code to
paragraphs in a file based on certain words specified by 'pattern'.
It first splits the whole text into pieces which depends on the seperator, then match the pattern with each pieces. When a matche is found, tha piece is coded to the code specified by cid. The default seperator defines paragraph as unit of analysis. The seperator is passed to the pattern argument of gregexpr.
This function is also useful for keyword in context (KWIC) analysis.
The function is used for its side effect.
[object Object]
getFileIds
codingBySearch("internet",fid=1,cid=2)
codingBySearch("internet",fid=getFileIds(),cid=2)
codingBySearch("internet",fid=getFileIds(),cid=2, seperator="[.!?]")