Skip to main content

Do It KWIC

  • Chapter
  • First Online:
  • 3991 Accesses

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

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info
Hardcover Book
USD   89.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Notes

  1. 1.

    See Firth (1957).

  2. 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

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2020 Springer Nature Switzerland AG

About this chapter

Check for updates. Verify currency and authenticity via CrossMark

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

Publish with us

Policies and ethics