Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
crew102 committed Oct 29, 2018
1 parent c193658 commit 22bb935
Show file tree
Hide file tree
Showing 40 changed files with 126 additions and 121 deletions.
8 changes: 4 additions & 4 deletions R/apply.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
#' @param queries Vector of queries to issue to the WoS API and pull data for.
#'
#' @return The same set of data frames that \code{\link{pull_wos}} returns, with
#' the addition of a data frame named \code{query}. This data frame contains a
#' mapping of queries to publications that were returned by those queries.
#' the addition of a data frame named \code{query}. This data frame frame tells
#' you which publications were returned by a given query.
#'
#' @examples
#' \dontrun{
Expand Down Expand Up @@ -73,10 +73,10 @@ one_pull_wos_apply <- function(query_name, queries, editions, sid, ...) {
#' Run \code{query_wos} across multiple queries
#'
#' @inheritParams query_wos
#' @param queries Vector of queries to issue to the WoS API.
#' @param queries Vector of queries run.
#'
#' @return A data frame which lists the number of records returned by each of
#' the queries in your \code{queries} vector.
#' your queries.
#'
#' @examples
#' \dontrun{
Expand Down
4 changes: 2 additions & 2 deletions R/auth.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#' \code{auth} asks the API's server for a session ID (SID), which you can then
#' pass along to either \code{\link{query_wos}} or \code{\link{pull_wos}}. Note,
#' there are limits on how many session IDs you can get in a given period of time
#' (roughly 5 SIDs in a 5 minute time period).
#' (roughly 5 SIDs in a 5 minute period).
#'
#' @param username Your username. Specify \code{username = NULL} if you want to
#' use IP-based authentication.
Expand All @@ -18,7 +18,7 @@
#' # Pass user credentials in manually:
#' auth("some_username", password = "some_password")
#'
#' # Use default of looking for username and password in envvars, so you
#' # Use the default of looking for username and password in envvars, so you
#' # don't have to keep specifying them in your code:
#' Sys.setenv(WOS_USERNAME = "some_username", WOS_PASSWORD = "some_password")
#' auth()
Expand Down
3 changes: 1 addition & 2 deletions R/io.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#' write_wos_data(wos_data, ".")
#'
#' # Write files to "wos-data" dir
#' dir.create("wos-data")
#' write_wos_data(wos_data, "wos-data")
#'}
#' @export
Expand Down Expand Up @@ -54,7 +53,7 @@ full_path <- function(dir, x) file.path(dir, paste0(x, ".csv"))
#' \code{\link{write_wos_data}}) and places the data in an object of class
#' \code{wos_data}.
#'
#' @param dir Path the directory where you wrote the CSV files.
#' @param dir Path to the directory where you wrote the CSV files.
#'
#' @return An object of class \code{wos_data}.
#'
Expand Down
4 changes: 2 additions & 2 deletions R/pull-cited-refs.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
#' @return A data frame with the following columns:
#' \describe{
#' \item{ut}{The publication that is doing the citing. These are the UTs that
#' you submitted to \code{pull_cited_refs}. If one of your publications does
#' not have any cited refs, it will not appear in this column.}
#' you submitted to \code{pull_cited_refs}. If one of your publications
#' doesn't have any cited refs, it will not appear in this column.}
#'
#' \item{doc_id}{The cited ref's document identifier (similar to a UT).}
#'
Expand Down
4 changes: 2 additions & 2 deletions R/pull-incites.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' Pull data from InCites
#' Pull data from the InCites API
#'
#' \strong{Important note:} The throttling limits on the InCites API are not
#' documented anywhere and are difficult to determine from experience. As such,
Expand All @@ -23,7 +23,7 @@
#' the API's documentation \href{http://about.incites.thomsonreuters.com/api/#/}{page}
#' (see the \code{DocumentLevelMetricsByUT} method details for definitions).
#' Note that the column names are all converted to lowercase by
#' \code{pull_incites} and the 0/1 flag variables are converted to booleans).
#' \code{pull_incites} and the 0/1 flag variables are converted to booleans.
#' Also note that not all publications indexed in WoS are also indexed in
#' InCites, so you may not get data back for some UTs.
#'
Expand Down
11 changes: 6 additions & 5 deletions R/pull-related-recs.R
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
#' Pull related records
#'
#' Pull the records that have at least one citation in common with a publication
#' of interest
#' of interest.
#'
#' @inheritParams query_wos
#' @param uts The documents you want to find related records for
#' @param num_recs Number of related records to pull for each UT
#' @param uts The documents whose related records you want to pull.
#' @param num_recs Number of related records to pull for each UT. This value
#' must be <= 100.
#'
#' @return A data frame with the following columns:
#' \describe{
#' \item{ut}{The publications that you passed into \code{pull_related_rds}.
#' \item{ut}{The publications that you passed into \code{pull_related_recs}.
#' If one of your publications doesn't have any related records, it won't
#' appear here.}
#'
#' \item{related_rec}{The publication that is related to \code{ut}.}
#'
#' \item{rec_num}{The related record's ordering in the result set returned
#' by the API. Records that share more citations with your UTs will have
#' lower \code{rec_num}s.}
#' smaller \code{rec_num}s.}
#' }
#'
#' @examples
Expand Down
12 changes: 6 additions & 6 deletions R/pull-wos.R
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
#' Pull data from the Web of Science
#'
#' \code{pull_wos} wraps the process of querying, downloading, parsing, and
#' processing the Web of Science data that the API serves.
#' processing Web of Science data.
#'
#' @inheritParams query_wos
#'
#' @return A list of the following data frames:
#' \describe{
#' \item{publication}{A data frame where each row corresponds to a different
#' publication. Note that each publication has a distinct \code{ut}. There is
#' a one-to-one relationship between a \code{ut} and each of the fields
#' a one-to-one relationship between a \code{ut} and each of the columns
#' in this table.}
#'
#' \item{author}{A data frame where each row corresponds to a different
#' publication/author pair (i.e., a \code{ut}/\code{author_no} pair). In
#' other words, each row corresponds to a different author on a publication.
#' You can link the authors in this table to the \code{address} and
#' \code{author_address} tables to get their addresses (if they exist). See
#' example in vignette for details.}
#' example in FAQs for details.}
#'
#' \item{address}{A data frame where each row corresponds to a different
#' publication/address pair (i.e., a \code{ut}/\code{addr_no} pair). In
#' other words, each row corresponds to a different address on a publication.
#' You can link the addresses in this table to the \code{author} and
#' \code{author_address} tables to see which authors correspond to which
#' addresses. See example in vignette for details.}
#' addresses. See example in FAQs for details.}
#'
#' \item{author_address}{A data frame that specifies which authors correspond
#' to which addresses on a given publication. This data frame is meant to
Expand All @@ -35,11 +35,11 @@
#' relationship between \code{ut}'s and \code{jsc}'s.}
#'
#' \item{keyword}{A data frame where each row corresponds to a different
#' publication/keyword pair. These keywords are the author-assigned keywords.}
#' publication/keyword pair. These are the author-assigned keywords.}
#'
#' \item{keywords_plus}{A data frame where each row corresponds to a different
#' publication/keywords_plus pair. These keywords are the keywords assigned
#' by the Web of Science through an automated process.}
#' by Clarivate Analytics through an automated process.}
#'
#' \item{grant}{A data frame where each row corresponds to a different
#' publication/grant agency/grant ID triplet. Not all publications acknowledge
Expand Down
10 changes: 5 additions & 5 deletions R/query-wos.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
#'
#' Returns the number of records that match a given query. It's best to call
#' this function before calling \code{\link{pull_wos}} so that you know how
#' many records you are trying to download before you attempt to do so.
#' many records you're trying to download before attempting to do so.
#'
#' @param query Query string. See the \href{https://images.webofknowledge.com/images/help/WOK/hs_search_operators.html#dsy863-TRS_search_operator_precedence}{WoS query documentation} page
#' for details on how to write a query as well as a the list of \href{http://images.webofknowledge.com.ezproxy.lib.vt.edu/WOKRS527R13/help/WOS/hp_advanced_examples.html}{example queries}.
#' for details on how to write a query as well as this list of \href{http://images.webofknowledge.com.ezproxy.lib.vt.edu/WOKRS527R13/help/WOS/hp_advanced_examples.html}{example queries}.
#' @param editions Web of Science editions to query. Possible values are listed
#' \href{http://ipscience-help.thomsonreuters.com/wosWebServicesLite/dbEditionsOptionsGroup/databaseEditionsWos.html}{here}.
#' @param sid Session identifier (SID). The default setting is to get a fresh
Expand All @@ -14,7 +14,7 @@
#' throttling limits placed on new sessions.
#' @param ... Arguments passed along to \code{\link[httr]{POST}}.
#'
#' @return An object of class \code{query_result}. This object has the number
#' @return An object of class \code{query_result}. This object contains the number
#' of publications that are returned by your query (\code{rec_cnt}), as well as
#' some info that \code{\link{pull_wos}} uses when it calls \code{query_wos}
#' internally.
Expand Down Expand Up @@ -106,13 +106,13 @@ paste_eds <- function(editions) {

escape_query <- function(query) gsub("&", "&amp;", query)

#' Create a list of UT-based queries
#' Create a vector of UT-based queries
#'
#' Use this function when you have a bunch of UTs whose data you want to pull
#' and you need to write a series of UT-based queries to do so (i.e., queries
#' in the form "UT = (WOS:000186387100005 OR WOS:000179260700001)").
#'
#' @param uts Vector of UTs that will be placed inside the UT-based queries.
#' @param uts UTs that will be placed inside the UT-based queries.
#' @param uts_per_query Number of UTs to include in each query. Note, there is
#' a limit on how long your query can be, so you probably want to keep this set
#' to around 200.
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ wosr
Installation
------------

You can get the stable version from CRAN
You can get the stable version from CRAN:

``` r
install.packages("wosr")
```

Or the development version from GitHub
Or the development version from GitHub:

``` r
if (!"devtools" %in% rownames(installed.packages()))
Expand Down
4 changes: 2 additions & 2 deletions README.rmd
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ options(digits = 2)

## Installation

You can get the stable version from CRAN
You can get the stable version from CRAN:

```r
install.packages("wosr")
```

Or the development version from GitHub
Or the development version from GitHub:

```r
if (!"devtools" %in% rownames(installed.packages()))
Expand Down
6 changes: 3 additions & 3 deletions docs/articles/faqs.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 22bb935

Please sign in to comment.