Learn R Programming

rplos (version 0.4.0)

plostitle: Search PLoS Journals titles.

Description

Search PLoS Journals titles.

Usage

plostitle(q = NULL, fl = "id", fq = NULL, sort = NULL, start = 0, limit = 10, key = NULL, sleep = 6, callopts = list(), terms = NULL, fields = NULL, toquery = NULL)

Arguments

q
Search terms (character). You can search on specific fields by doing 'field:your query'. For example, a real query on a specific field would be 'author:Smith'.
fl
Fields to return from search (character) [e.g., 'id,title'], any combination of search fields [type 'data(plosfields)', then 'plosfields'].
fq
List specific fields to filter the query on (if NA, all queried). The options for this parameter are the same as those for the fl parameter. Note that using this parameter doesn't influence the actual query, but is used to filter the resuls to a subset of those you want returned. For example, if you want full articles only, you can do 'doc_type:full'. In another example, if you want only results from the journal PLOS One, you can do 'cross_published_journal_key:PLoSONE'. See journalnamekey() for journal abbreviations.
sort
Sort results according to a particular field, and specify ascending (asc) or descending (desc) after a space; see examples. For example, to sort the counter_total_all field in descending fashion, do sort='counter_total_all desc'
start
Record to start at (used in combination with limit when you need to cycle through more results than the max allowed=1000)
limit
Number of results to return (integer)
key
Your PLoS API key, either enter as the key, or loads from .Rprofile. See details.
sleep
Number of seconds to wait between requests. No need to use this for a single call to searchplos. However, if you are using searchplos in a loop or lapply type call, do sleep parameter is used to prevent your IP address from being blocked. You can only do 10 requests per minute, so one request every 6 seconds is about right.
callopts
Optional additional curl options (debugging tools mostly)
terms
DEPRECATED PARAMETER - replaced with the q param.
fields
DEPRECATED PARAMETER - replaced with the fl param.
toquery
DEPRECATED PARAMETER - replaced with the fq param.

Value

Titles, in addition to any other fields requested in a data.frame.

Details

Get a PLOS API key at http://alm.plos.org/. Note that the API key you recieve at that URL works for the PLOS ALM (article-level metrics) API as well. See the alm package http://cran.r-project.org/web/packages/alm/index.html to access PLOS ALM data.

You can store your PLOS Search API key in your .Rprofile file so that you don't have to enter the key each function call. Open up your .Rprofile file on your computer, and put it an entry like:

options(PlosApiKey = "your plos api key")

Faceting: Read more about faceting here: urlhttp://wiki.apache.org/solr/SimpleFacetParameters

See Also

plosauthor, plosabstract, plostitle, plosfigtabcaps

Examples

Run this code
## Not run: 
# plostitle(q='drosophila', fl='title', limit=99)
# plostitle(q='drosophila', fl=c('title','journal'), limit=10)
# plostitle(q='drosophila',  limit = 5)
# ## End(Not run)

Run the code above in your browser using DataLab