Description Usage Arguments How to use it Examples
Performs basic keyword searching in the Text Creation Partnership index.
1 |
term |
A character string (i.e., the search term). |
range |
A numeric vector representing the desired date range, usually provided in the form 1600:1610. For a single year, just enter the year number. |
field |
A character string (i.e., the search field). Must be identical to the name of a column in the TCP index. Valid field names include "TCP","EEBO","VID","STC","Status","Author","Date","Title", "Terms",and "Pages" (case-sensitive). |
free |
A logical value. If TRUE, will limit results to freely available texts. To see "Restricted" items, set this argument to FALSE. |
write |
A logical value. If TRUE, will write the results to a .csv file, called "index.csv" in your working directory. BE CAREFUL WHEN USING, because it will over-write any existing "index.csv" file. |
The most common situation for using tcpSearch
is when you
want to find and download content from Text Creation Partnership. In this case, follow
these steps.
Create a folder where you'll store your XML files.
Play with tcpSearch
until you find results that look useful to you.
Enter the command: results = tcpSearch(YOUR SEARCH, write = T)
. This
generates a 'results' object and writes it to .csv as "index.csv."
Enter the command: tcpDownload(results)
. This will download the selected
files.
1 2 3 4 5 6 | tcpSearch(term = "Robinson Crusoe", field = "Title")
tcpSearch(term = "Defoe", field = "Author") # search by author
tcpSearch(term = "Travel", field = "Terms") # search by subject terms
tcpSearch(range = 1700:1735, field = "Date") # search by date
results = tcpSearch(term = "Defoe", field = "Author") # creates a 'results' data frame in R
tcpSearch(term = "Robinson Crusoe", field = "Title", write = TRUE) # writes an index to .csv
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.