From 46a1458b3cf0be848c96dede589e8401162907fc Mon Sep 17 00:00:00 2001 From: Najko Jahn Date: Mon, 2 Oct 2017 11:49:19 +0200 Subject: [PATCH] some minor typos --- R/oadoi_fetch.r | 13 +++--- R/roadoi-package.r | 5 +-- README.Rmd | 2 +- README.md | 102 +++++++++++++++++++++--------------------- man/oadoi_fetch.Rd | 9 ++-- man/roadoi-package.Rd | 5 +-- vignettes/intro.Rmd | 10 ++--- 7 files changed, 72 insertions(+), 74 deletions(-) diff --git a/R/oadoi_fetch.r b/R/oadoi_fetch.r index 5308a99..248505d 100644 --- a/R/oadoi_fetch.r +++ b/R/oadoi_fetch.r @@ -7,7 +7,7 @@ #' #' @param dois character vector, search by a single DOI or many DOIs. #' A rate limit of 100k requests per day is suggested. If you need to access -#' more data, use the data dump \url{https://oadoi.org/api#dataset} instead. +#' more data, request the data dump \url{https://oadoi.org/api} instead. #' @param email character vector, mandatory! oaDOI requires your email address, #' so that they can track usage and notify you when something breaks. #' Set email address in your `.Rprofile` file with @@ -17,9 +17,8 @@ #' See \code{\link[plyr]{create_progress_bar}} for details #' of each. By default, no progress bar is displayed. #' -#' @return The result is a tibble with each row representing a publication and -#' and the following columns. Here are some fields returned by the API. -#' However, other fields can be added by oaDOI over time. +#' @return The result is a tibble with each row representing a publication. +#' Here are the returned columns and descriptions according to the API docu: #' #' #' \tabular{ll}{ @@ -65,7 +64,7 @@ #' #' #' To unnest list-columns, you want to use tidyr's unnest function -#' \code{\link[tidyr]{unnest}} makes each element of the list its own row. +#' \code{\link[tidyr]{unnest}}. #' @examples \dontrun{ #' oadoi_fetch("10.1038/nature12373", email = "name@example.com") @@ -84,8 +83,8 @@ oadoi_fetch <- if (length(dois) > api_limit) stop( "A rate limit of 100k requests per day is suggested. - If you need to access tomore data, use the data dump - https://oadoi.org/api#dataset instead", + If you need to access more data, request the data dump + https://oadoi.org/api instead", .call = FALSE ) # Call API for every DOI, and return results as tbl_df diff --git a/R/roadoi-package.r b/R/roadoi-package.r index 733723d..7628f56 100644 --- a/R/roadoi-package.r +++ b/R/roadoi-package.r @@ -9,9 +9,8 @@ #' information and full-text links from oaDOI. #' #' @section Contribute: -#' I would be very happy for people willing to contribute to this package. -#' It is important to keep in mind that oaDOI is still in early development, -#' which could affect the API and this client. +#' I would be very happy for people willing to contribute to this package. Use +#' GitHubs issue tracker for bug reporting and feature requests. #' #' @importFrom httr GET content modify_url user_agent add_headers status_code timeout #' @importFrom jsonlite fromJSON diff --git a/README.Rmd b/README.Rmd index 3be51f2..359abee 100644 --- a/README.Rmd +++ b/README.Rmd @@ -36,7 +36,7 @@ roadoi::oadoi_fetch(dois = c("10.1038/ng.3260", "10.1093/nar/gkr1047"), email = "name@example.com") ``` -There are no API restrictions. However, providing an email address is required and a rate limit of 100k is implemented If you need to access more data, use the data dump instead. +There are no API restrictions. However, providing an email address is required and a rate limit of 100k is suggested. If you need to access more data, ask for the data dump instead. ### RStudio Addin diff --git a/README.md b/README.md index 4e56819..b4bf59e 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ roadoi::oadoi_fetch(dois = c("10.1038/ng.3260", "10.1093/nar/gkr1047"), #> # year , updated , non_compliant ``` -There are no API restrictions. However, providing an email address is required and a rate limit of 100k is implemented If you need to access more data, use the data dump instead. +There are no API restrictions. However, providing an email address is required and a rate limit of 100k is suggested. If you need to access more data, ask for the data dump instead. ### RStudio Addin @@ -129,11 +129,11 @@ that contain useful metadata about the OA sources found by oaDOI. These are **Column**|**Description** |:------------|:---------------------------------------------- -evidence`|How the OA location was found and is characterized by oaDOI? -host_type`|OA full-text provided by `publisher` or `repository`. -license`|The license under which this copy is published -url`|The URL where you can find this OA copy. -versions`|The content version accessible at this location following the DRIVER 2.0 Guidelines evidence () +`evidence`|How the OA location was found and is characterized by oaDOI? +`host_type`|OA full-text provided by `publisher` or `repository`. +`license`|The license under which this copy is published +`url`|The URL where you can find this OA copy. +`versions`|The content version accessible at this location following the DRIVER 2.0 Guidelines () You can [simplify these list-columns in at least two ways](http://r4ds.had.co.nz/many-models.html#simplifying-list-columns). @@ -244,27 +244,28 @@ random_dois <- rcrossref::cr_r(sample = 100) %>% .$data random_dois #> # A tibble: 100 x 35 -#> alternative.id container.title -#> -#> 1 Southern Medical Journal -#> 2 10.1021/cm000092r Chemistry of Materials -#> 3 Overcoming Anxiety for Dummies® -#> 4 S0006291X72800251 Biochemical and Biophysical Research Communications -#> 5 Acta Theriologica -#> 6 Virginia Law Review -#> 7 0378475489900542 Mathematics and Computers in Simulation -#> 8 S0169433212014869 Applied Surface Science -#> 9 S0922156500002120 Leiden Journal of International Law -#> 10 S000299041934058166 Bulletin of the American Mathematical Society -#> # ... with 90 more rows, and 33 more variables: created , -#> # deposited , DOI , funder , indexed , ISBN , -#> # ISSN , issue , issued , link , member , -#> # page , prefix , publisher , reference.count , -#> # score , source , subject , subtitle , title , -#> # type , URL , volume , assertion , author , -#> # `clinical-trial-number` , license_date , license_URL , -#> # license_delay.in.days , license_content.version , -#> # update.policy , abstract , archive +#> alternative.id +#> +#> 1 +#> 2 +#> 3 +#> 4 10.1080/10739149908085828 +#> 5 +#> 6 +#> 7 +#> 8 S0266462300004918 +#> 9 +#> 10 BF00202270 +#> # ... with 90 more rows, and 34 more variables: container.title , +#> # created , deposited , DOI , funder , +#> # indexed , ISBN , ISSN , issue , issued , +#> # link , member , page , prefix , publisher , +#> # reference.count , score , source , subject , +#> # title , type , URL , assertion , author , +#> # `clinical-trial-number` , volume , archive , +#> # license_date , license_URL , license_delay.in.days , +#> # license_content.version , subtitle , abstract , +#> # update.policy ``` Let's see when these random publications were published @@ -281,16 +282,16 @@ random_dois %>% #> # A tibble: 49 x 2 #> issued pubs #> -#> 1 2010 5 -#> 2 2013 5 -#> 3 NA 5 -#> 4 1999 4 -#> 5 2004 4 -#> 6 2006 4 -#> 7 2007 4 -#> 8 2009 4 -#> 9 2011 4 -#> 10 2014 4 +#> 1 NA 12 +#> 2 2003 5 +#> 3 2006 4 +#> 4 2012 4 +#> 5 2014 4 +#> 6 1985 3 +#> 7 1993 3 +#> 8 1994 3 +#> 9 1998 3 +#> 10 2007 3 #> # ... with 39 more rows ``` @@ -305,13 +306,13 @@ random_dois %>% #> # A tibble: 7 x 2 #> type pubs #> -#> 1 journal-article 78 +#> 1 journal-article 72 #> 2 book-chapter 8 -#> 3 proceedings-article 7 -#> 4 component 3 -#> 5 journal-issue 2 -#> 6 monograph 1 -#> 7 other 1 +#> 3 component 7 +#> 4 proceedings-article 7 +#> 5 dataset 3 +#> 6 reference-entry 2 +#> 7 journal-issue 1 ``` #### Calling oaDOI.org @@ -352,8 +353,8 @@ my_df %>% |is_oa | Articles| Proportion| |:-----|--------:|----------:| -|FALSE | 82| 0.82| -|TRUE | 18| 0.18| +|FALSE | 80| 0.8| +|TRUE | 20| 0.2| How did oaDOI find those Open Access full-texts, which were characterized as best matches, and how are these OA types distributed over publication types? @@ -372,11 +373,12 @@ my_df %>% |evidence |type | Articles| |:-------------------------------|:-------------------|--------:| -|hybrid (via free pdf) |journal-article | 7| -|oa repository (via BASE) |journal-article | 7| -|oa repository (via BASE) |proceedings-article | 2| -|hybrid (via crossref license) |journal-article | 1| -|oa journal (via publisher name) |component | 1| +|hybrid (via free pdf) |journal-article | 8| +|oa journal (via publisher name) |component | 5| +|oa repository (via BASE) |journal-article | 3| +|hybrid (via crossref license) |journal-article | 2| +|oa journal (via publisher name) |journal-article | 1| +|oa repository (via BASE) |proceedings-article | 1| #### More examples diff --git a/man/oadoi_fetch.Rd b/man/oadoi_fetch.Rd index d626bf8..979987f 100644 --- a/man/oadoi_fetch.Rd +++ b/man/oadoi_fetch.Rd @@ -10,7 +10,7 @@ oadoi_fetch(dois = NULL, email = getOption("roadoi_email"), \arguments{ \item{dois}{character vector, search by a single DOI or many DOIs. A rate limit of 100k requests per day is suggested. If you need to access -more data, use the data dump \url{https://oadoi.org/api#dataset} instead.} +more data, request the data dump \url{https://oadoi.org/api} instead.} \item{email}{character vector, mandatory! oaDOI requires your email address, so that they can track usage and notify you when something breaks. @@ -23,9 +23,8 @@ See \code{\link[plyr]{create_progress_bar}} for details of each. By default, no progress bar is displayed.} } \value{ -The result is a tibble with each row representing a publication and - and the following columns. Here are some fields returned by the API. - However, other fields can be added by oaDOI over time. +The result is a tibble with each row representing a publication. + Here are the returned columns and descriptions according to the API docu: \tabular{ll}{ @@ -71,7 +70,7 @@ that contain useful metadata about the OA sources found by oaDOI. These are To unnest list-columns, you want to use tidyr's unnest function -\code{\link[tidyr]{unnest}} makes each element of the list its own row. +\code{\link[tidyr]{unnest}}. } \description{ This is the main function to retrieve comprehensive open access status diff --git a/man/roadoi-package.Rd b/man/roadoi-package.Rd index 1fcfc82..349da34 100644 --- a/man/roadoi-package.Rd +++ b/man/roadoi-package.Rd @@ -22,9 +22,8 @@ information and full-text links from oaDOI. \section{Contribute}{ -I would be very happy for people willing to contribute to this package. -It is important to keep in mind that oaDOI is still in early development, -which could affect the API and this client. +I would be very happy for people willing to contribute to this package. Use +GitHubs issue tracker for bug reporting and feature requests. } \keyword{package} diff --git a/vignettes/intro.Rmd b/vignettes/intro.Rmd index 025c284..f86f242 100644 --- a/vignettes/intro.Rmd +++ b/vignettes/intro.Rmd @@ -59,11 +59,11 @@ that contain useful metadata about the OA sources found by oaDOI. These are **Column**|**Description** |:------------|:---------------------------------------------- -evidence`|How the OA location was found and is characterized by oaDOI? -host_type`|OA full-text provided by `publisher` or `repository`. -license`|The license under which this copy is published -url`|The URL where you can find this OA copy. -versions`|The content version accessible at this location following the DRIVER 2.0 Guidelines evidence () +`evidence`|How the OA location was found and is characterized by oaDOI? +`host_type`|OA full-text provided by `publisher` or `repository`. +`license`|The license under which this copy is published +`url`|The URL where you can find this OA copy. +`versions`|The content version accessible at this location following the DRIVER 2.0 Guidelines () You can [simplify these list-columns in at least two ways](http://r4ds.had.co.nz/many-models.html#simplifying-list-columns).