Abstract
In the last chapter a simple inline function was used within a call to the sapply function. In this chapter we explore user-defined functions more broadly and write a custom function for producing a Keyword in Context (KWIC) list.
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsNotes
- 1.
See Firth (1957).
- 2.
In regular expressions, the period is a special metacharacter. If you want to search for a literal period character, you need to escape it using two backslash characters. If you do not escape the period character, it will be treated as a wildcard that will match any character.
References
Firth JR (1957) Studies in Linguistic Analysis. Blackwell
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2020 Springer Nature Switzerland AG
About this chapter
Cite this chapter
L. Jockers, M., Thalken, R. (2020). Do It KWIC. In: Text Analysis with R. Quantitative Methods in the Humanities and Social Sciences. Springer, Cham. https://doi.org/10.1007/978-3-030-39643-5_9
Download citation
DOI: https://doi.org/10.1007/978-3-030-39643-5_9
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-39642-8
Online ISBN: 978-3-030-39643-5
eBook Packages: Mathematics and StatisticsMathematics and Statistics (R0)