Skip to content

Commit

Permalink
Merge pull request #298 from stitam/new_release
Browse files Browse the repository at this point in the history
Final edits before v1.1
  • Loading branch information
stitam committed Oct 1, 2020
2 parents a931d81 + 62c70cb commit 6433e7e
Show file tree
Hide file tree
Showing 53 changed files with 199 additions and 265 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Expand Up @@ -25,3 +25,4 @@ README_cache
^\.github$

codemeta.json
^codemeta\.json$
4 changes: 2 additions & 2 deletions DESCRIPTION
Expand Up @@ -7,8 +7,8 @@ Description: Chemical information from around the web. This package interacts
Flavornet, NIST Chemistry WebBook, OPSIN, PAN Pesticide Database, PubChem,
SRS, Wikidata.
Type: Package
Version: 1.0.0.9001
Date: 2020-05-27
Version: 1.1.0
Date: 2020-10-01
License: MIT + file LICENSE
URL: https://docs.ropensci.org/webchem, https://github.com/ropensci/webchem
BugReports: https://github.com/ropensci/webchem/issues
Expand Down
165 changes: 82 additions & 83 deletions NEWS.md

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions R/alanwood.R
Expand Up @@ -20,7 +20,6 @@
#' Ralf B. Schäfer (2020). webchem: An R Package to Retrieve Chemical
#' Information from the Web. Journal of Statistical Software, 93(13).
#' <doi:10.18637/jss.v093.i13>.
#' @author Eduard Szöcs, \email{eduardszoecs@@gmail.com}
#' @export
#' @examples
#' \dontrun{
Expand Down Expand Up @@ -176,7 +175,6 @@ aw_query <- function(query, from = c("name", "cas"), verbose = TRUE,
#' @param force_build logical; force building a new index?
#' @return a data.frame
#' @seealso \code{\link{aw_query}}, \code{\link{tempdir}}
#' @author Eduard Szöcs, \email{eduardszoecs@@gmail.com}
#' @source \url{http://www.alanwood.net/pesticides}
#' @noRd
build_aw_idx <- function(verbose = TRUE, force_build = FALSE) {
Expand Down
4 changes: 0 additions & 4 deletions R/chebi.R
Expand Up @@ -55,7 +55,6 @@
#' Ralf B. Schäfer (2020). webchem: An R Package to Retrieve Chemical
#' Information from the Web. Journal of Statistical Software, 93(13).
#' <doi:10.18637/jss.v093.i13>.
#' @author Andreas Scharmüller, \email{andschar@@protonmail.com}
#' @export
#' @examples
#' \donttest{
Expand Down Expand Up @@ -230,7 +229,6 @@ get_chebiid <- function(query,
#' Ralf B. Schäfer (2020). webchem: An R Package to Retrieve Chemical
#' Information from the Web. Journal of Statistical Software, 93(13).
#' <doi:10.18637/jss.v093.i13>.
#' @author Andreas Scharmüller, \email{andschar@@protonmail.com}
#' @export
#' @examples
#' \donttest{
Expand Down Expand Up @@ -356,7 +354,6 @@ chebi_comp_entity <- function(chebiid,
#' @param x list; a list to bind into a data.frame
#' @return a data.frame
#' @seealso \code{\link{chebi_comp_entity}}
#' @author Andreas Scharmüller, \email{andschar@@protonmail.com}
#' @noRd
#'
l2df <- function(x) {
Expand All @@ -375,7 +372,6 @@ l2df <- function(x) {
#' https://stackoverflow.com/questions/17308551/do-callrbind-list-for-uneven-number-of-column
#' @param x list; a list to bind into a data.frame
#' @seealso \code{\link{l2df}}
#' @author Andreas Scharmüller, \email{andschar@@protonmail.com}
#' @noRd
#'
rbind_named_fill <- function(x) {
Expand Down
16 changes: 0 additions & 16 deletions R/chemspider.R
Expand Up @@ -44,7 +44,6 @@ cs_check_key <- function() {
#' for an API key. Please respect the Terms & Conditions. The Terms & Conditions
#' can be found at \url{https://developer.rsc.org/terms}.
#' @references \url{https://developer.rsc.org/compounds-v1/apis}
#' @author Tamás Stirling, \email{stirling.tamas@@gmail.com}
#' @export
#' @examples
#' \dontrun{
Expand Down Expand Up @@ -101,7 +100,6 @@ cs_datasources <- function(apikey = NULL) {
#' The controls that are available for a given function are indicated within the
#' documentation of the function.
#' @references \url{https://developer.rsc.org/compounds-v1/apis}
#' @author Tamás Stirling, \email{stirling.tamas@@gmail.com}
#' @seealso \code{\link{get_csid}}
#' @export
#' @examples
Expand Down Expand Up @@ -161,8 +159,6 @@ cs_control <- function(datasources = vector(),
#' Ralf B. Schäfer (2020). webchem: An R Package to Retrieve Chemical
#' Information from the Web. Journal of Statistical Software, 93(13).
#' <doi:10.18637/jss.v093.i13>.
#' @author Eduard Szöcs, \email{eduardszoecs@@gmail.com}
#' @author Tamás Stirling, \email{stirling.tamas@@gmail.com}
#' @importFrom httr POST add_headers http_status
#' @importFrom jsonlite toJSON
#' @importFrom tibble enframe
Expand Down Expand Up @@ -243,7 +239,6 @@ get_csid <- function(query,
#' for an API key.
#' Please respect the Terms & conditions \url{https://developer.rsc.org/terms}.
#' @references \url{https://developer.rsc.org/compounds-v1/apis}
#' @author Tamás Stirling, \email{stirling.tamas@@gmail.com}
#' @noRd
cs_query_csid <- function(postres, headers) {
query_id <- jsonlite::fromJSON(rawToChar(postres$content))$queryId
Expand Down Expand Up @@ -315,7 +310,6 @@ cs_query_csid <- function(postres, headers) {
#' for an API key. Please respect the Terms & conditions
#' \url{https://developer.rsc.org/terms}.
#' @references https://developer.rsc.org/compounds-v1/apis
#' @author Tamás Stirling, \email{stirling.tamas@@gmail.com}
#' @note This is a low level function and is not exported.
#' @examples
#' \dontrun{
Expand Down Expand Up @@ -364,7 +358,6 @@ cs_name_csid <- function(name, apikey = NULL, control = cs_control()) {
#' for an API key. Please respect the Terms & conditions
#' \url{https://developer.rsc.org/terms}.
#' @references \url{https://developer.rsc.org/compounds-v1/apis}
#' @author Tamás Stirling, \email{stirling.tamas@@gmail.com}
#' @note This is a low level function and is not exported.
#' @examples
#' \dontrun{
Expand Down Expand Up @@ -409,7 +402,6 @@ cs_formula_csid <- function(formula, apikey = NULL, control = cs_control()) {
#' for an API key. Please respect the Terms & conditions
#' \url{https://developer.rsc.org/terms}.
#' @references \url{https://developer.rsc.org/compounds-v1/apis}
#' @author Tamás Stirling, \email{stirling.tamas@@gmail.com}
#' @note This is a low level function and is not exported.
#' @examples
#' \dontrun{
Expand Down Expand Up @@ -451,7 +443,6 @@ cs_smiles_csid <- function(smiles, apikey = NULL) {
#' for an API key. Please respect the Terms & conditions
#' \url{https://developer.rsc.org/terms}.
#' @references \url{https://developer.rsc.org/compounds-v1/apis}
#' @author Tamás Stirling, \email{stirling.tamas@@gmail.com}
#' @note This is a low level function and is not exported.
#' @examples
#' \dontrun{
Expand Down Expand Up @@ -495,7 +486,6 @@ cs_inchi_csid <- function(inchi, apikey = NULL) {
#' for an API key. Please respect the Terms & conditions
#' \url{https://developer.rsc.org/terms}.
#' @references \url{https://developer.rsc.org/compounds-v1/apis}
#' @author Tamás Stirling, \email{stirling.tamas@@gmail.com}
#' @note This is a low level function and is not exported.
#' @examples
#' \dontrun{
Expand Down Expand Up @@ -550,7 +540,6 @@ cs_inchikey_csid <- function(inchikey, apikey = NULL) {
#' for an API key. Please respect the Terms & Conditions. The Terms & Conditions
#' can be found at \url{https://developer.rsc.org/terms}.
#' @references \url{https://developer.rsc.org/compounds-v1/apis}
#' @author Tamás Stirling, \email{stirling.tamas@@gmail.com}
#' @seealso This is a low level function and is not exported. See
#' \code{\link{cs_convert}} for the top level function.
#' @seealso \code{\link{parse_mol}}
Expand Down Expand Up @@ -618,8 +607,6 @@ cs_convert_multiple <- function(input, from, to, apikey = NULL) {
#' Ralf B. Schäfer (2020). webchem: An R Package to Retrieve Chemical
#' Information from the Web. Journal of Statistical Software, 93(13).
#' <doi:10.18637/jss.v093.i13>.
#' @author Eduard Szöcs, \email{eduardszoecs@@gmail.com}
#' @author Tamás Stirling, \email{stirling.tamas@@gmail.com}
#' @export
#' @examples
#' \dontrun{
Expand Down Expand Up @@ -710,7 +697,6 @@ cs_convert <- function(query, from, to, apikey = NULL) {
#' for an API key. Please respect the Terms & Conditions. The Terms & Conditions
#' can be found at \url{https://developer.rsc.org/terms}.
#' @references \url{https://developer.rsc.org/compounds-v1/apis}
#' @author Tamás Stirling, \email{stirling.tamas@@gmail.com}
#' @export
#' @examples
#' \dontrun{
Expand Down Expand Up @@ -772,7 +758,6 @@ cs_compinfo <- function(csid, fields, apikey = NULL) {
#' for a security token.
#' Please respect the Terms & conditions
#' \url{https://www.rsc.org/help-legal/legal/terms-conditions/}.
#' @author Eduard Szöcs, \email{eduardszoecs@@gmail.com}
#' @seealso \code{\link{get_csid}} to retrieve ChemSpider IDs,
#' \code{\link{cs_compinfo}} for extended compound information.
#' @note use \code{\link{cs_compinfo}} to retrieve standard inchikey.
Expand Down Expand Up @@ -850,7 +835,6 @@ use 'cs_commpinfo()' instead.")
#' for an API key. Please respect the Terms & Conditions. The Terms & Conditions
#' can be found at \url{https://developer.rsc.org/terms}.
#' @references \url{https://developer.rsc.org/compounds-v1/apis}
#' @author Tamas Stirling, \email{stirling.tamas@@gmail.com}
#' @seealso \code{\link{get_csid}}, \code{\link{cs_check_key}}
#' @importFrom httr GET add_headers message_for_status content
#' @importFrom jsonlite fromJSON
Expand Down
2 changes: 0 additions & 2 deletions R/cir.R
Expand Up @@ -96,7 +96,6 @@
#' \url{http://cactus.nci.nih.gov/blog/?p=1386}, \cr
#' \url{http://cactus.nci.nih.gov/blog/?p=1456}, \cr
#'
#' @author Eduard Szöcs, \email{eduardszoecs@@gmail.com}
#'
#' @examples
#' \donttest{
Expand Down Expand Up @@ -234,7 +233,6 @@ cir_query <- function(identifier, representation = "smiles",
#' \url{http://cactus.nci.nih.gov/blog/?p=1386}, \cr
#' \url{http://cactus.nci.nih.gov/blog/?p=1456}, \cr
#'
#' @author Andreas Scharmueller, \email{andschar@@protonmail.com}
#'
#' @examples
#' \donttest{
Expand Down
4 changes: 0 additions & 4 deletions R/cts.R
Expand Up @@ -10,7 +10,6 @@
#' @param inchikey deprecated
#' @return a list of lists (for each supplied inchikey):
#' a list of 7. inchikey, inchicode, molweight, exactmass, formula, synonyms and externalIds
#' @author Eduard Szöcs, \email{eduardszoecs@@gmail.com}
#'
#' @references Wohlgemuth, G., P. K. Haldiya, E. Willighagen, T. Kind, and O. Fiehn 2010The Chemical Translation Service
#' -- a Web-Based Tool to Improve Standardization of Metabolomic Reports. Bioinformatics 26(20): 2647–2648.
Expand Down Expand Up @@ -97,7 +96,6 @@ cts_compinfo <- function(query, from = "inchikey", verbose = TRUE, inchikey){
#' @param verbose logical; should a verbose output be printed on the console?
#' @param ... currently not used.
#' @return a list of character vectors or if \code{choices} is used, then a single named vector.
#' @author Eduard Szöcs, \email{eduardszoecs@@gmail.com}
#' @details See also \url{http://cts.fiehnlab.ucdavis.edu/}
#' for possible values of from and to.
#'
Expand Down Expand Up @@ -205,7 +203,6 @@ cts_convert <- function(query,
#' @import jsonlite
#' @param verbose logical; should a verbose output be printed on the console?
#' @return a character vector.
#' @author Eduard Szöcs, \email{eduardszoecs@@gmail.com}
#' @details See also \url{http://cts.fiehnlab.ucdavis.edu/services}
#'
#' @seealso \code{\link{cts_convert}}
Expand Down Expand Up @@ -242,7 +239,6 @@ cts_from <- function(verbose = TRUE){
#' @import jsonlite
#' @param verbose logical; should a verbose output be printed on the console?
#' @return a character vector.
#' @author Eduard Szoecs, \email{eduardszoecs@@gmail.com}
#' @details See also \url{http://cts.fiehnlab.ucdavis.edu/services}
#'
#' @seealso \code{\link{cts_convert}}
Expand Down
6 changes: 0 additions & 6 deletions R/etox.R
Expand Up @@ -27,9 +27,6 @@
#' Ralf B. Schäfer (2020). webchem: An R Package to Retrieve Chemical
#' Information from the Web. Journal of Statistical Software, 93(13).
#' <doi:10.18637/jss.v093.i13>.
#' @author Eduard Szöcs, \email{eduardszoecs@@gmail.com}
#' @author Tamás Stirling, \email{stirling.tamas@@gmail.com}
#' @author Andreas Scharmüller, \email{andschar@@protonmail.com}
#' @export
#' @examples
#' \dontrun{
Expand Down Expand Up @@ -159,7 +156,6 @@ get_etoxid <- function(query,
#' Ralf B. Schäfer (2020). webchem: An R Package to Retrieve Chemical
#' Information from the Web. Journal of Statistical Software, 93(13).
#' <doi:10.18637/jss.v093.i13>.
#' @author Eduard Szöcs, \email{eduardszoecs@@gmail.com}
#' @export
#' @examples
#' \dontrun{
Expand Down Expand Up @@ -286,7 +282,6 @@ etox_basic <- function(id, verbose = TRUE) {
#' Ralf B. Schäfer (2020). webchem: An R Package to Retrieve Chemical
#' Information from the Web. Journal of Statistical Software, 93(13).
#' <doi:10.18637/jss.v093.i13>.
#' @author Eduard Szöcs, \email{eduardszoecs@@gmail.com}
#' @export
#' @examples
#' \dontrun{
Expand Down Expand Up @@ -386,7 +381,6 @@ etox_targets <- function(id, verbose = TRUE) {
#' @seealso \code{\link{get_etoxid}} to retrieve ETOX IDs, \code{\link{etox_basic}} for basic information,
#' \code{\link{etox_targets}} for quality targets and \code{\link{etox_tests}} for test results
#'
#' @author Eduard Szöcs, \email{eduardszoecs@@gmail.com}
#' @export
#' @examples
#' \dontrun{
Expand Down
3 changes: 1 addition & 2 deletions R/flavornet.R
@@ -1,7 +1,7 @@
#' Retrieve flavor percepts from www.flavornet.org
#'
#' Retreive flavor percepts from \url{http://www.flavornet.org}. Flavornet is a database of 738 compounds with odors
#' perceptible to humans detected using gas chromatography ofactometry (GCO).
#' perceptible to humans detected using gas chromatography olfactometry (GCO).
#'
#' @import xml2
#' @importFrom stats rgamma
Expand All @@ -13,7 +13,6 @@
#'
#' @return A named character vector containing flavor percepts or NA's in the case of CAS numbers that are not found
#'
#' @author Eric Scott, \email{eric.scott@@tufts.edu}
#'
#' @examples
#' \dontrun{
Expand Down
1 change: 0 additions & 1 deletion R/pan.R
Expand Up @@ -49,7 +49,6 @@
#' Fresh Water Guidelines (ug/L); Salt Water Guidelines (ug/L);
#' Irrigation Water Guidelines (ug/L); Livestock Water Guidelines (ug/L);
#' Chemical Name; matching synonym; source URL
#' @author Eduard Szoecs, \email{eduardszoecs@@gmail.com}
#' @export
#' @examples
#' \dontrun{
Expand Down
7 changes: 0 additions & 7 deletions R/pubchem.R
Expand Up @@ -72,8 +72,6 @@
#' \url{https://pubchemdocs.ncbi.nlm.nih.gov/programmatic-access}, and the data
#' usage policies of the indicidual data sources
#' \url{https://pubchem.ncbi.nlm.nih.gov/sources/}.
#' @author Eduard Szöcs, \email{eduardszoecs@@gmail.com}
#' @author Tamás Stirling, \email{stirling.tamas@@gmail.com}
#' @import httr
#' @importFrom purrr map map2
#' @importFrom jsonlite fromJSON
Expand Down Expand Up @@ -283,7 +281,6 @@ get_cid <-
#' @param ... currently not used.
#'
#' @return a data.frame
#' @author Eduard Szöcs, \email{eduardszoecs@@gmail.com}
#' @seealso \code{\link{get_cid}}, \code{\link{pc_sect}}
#' @references Wang, Y., J. Xiao, T. O. Suzek, et al. 2009 PubChem: A Public
#' Information System for
Expand Down Expand Up @@ -442,7 +439,6 @@ pc_prop <- function(cid, properties = NULL, verbose = TRUE, ...) {
#' \url{https://pubchemdocs.ncbi.nlm.nih.gov/programmatic-access}, and the data
#' usage policies of the indicidual data sources
#' \url{https://pubchem.ncbi.nlm.nih.gov/sources/}.
#' @author Eduard Szöcs, \email{eduardszoecs@@gmail.com}
#' @export
#' @examples
#' \donttest{
Expand Down Expand Up @@ -547,7 +543,6 @@ pc_synonyms <- function(query,
#' @references Kim, S., Thiessen, P.A., Cheng, T. et al. PUG-View: programmatic
#' access to chemical annotations integrated in PubChem. J Cheminform 11, 56
#' (2019). https://doi.org/10.1186/s13321-019-0375-2.
#' @author Tamás Stirling, \email{stirling.tamas@@gmail.com}
#' @seealso \code{\link{get_cid}}, \code{\link{pc_prop}}
#' @examples
#' # might fail if API is not available
Expand Down Expand Up @@ -600,7 +595,6 @@ pc_sect <- function(id,
#' @references Kim, S., Thiessen, P.A., Cheng, T. et al. PUG-View: programmatic
#' access to chemical annotations integrated in PubChem. J Cheminform 11, 56
#' (2019). https://doi.org/10.1186/s13321-019-0375-2.
#' @author Tamás Stirling, \email{stirling.tamas@@gmail.com}
#' @examples
#' # might fail if API is not available
#' \donttest{
Expand Down Expand Up @@ -680,7 +674,6 @@ pc_page <- function(id,
#' @references Kim, S., Thiessen, P.A., Cheng, T. et al. PUG-View: programmatic
#' access to chemical annotations integrated in PubChem. J Cheminform 11, 56
#' (2019). https://doi.org/10.1186/s13321-019-0375-2.
#' @author Tamás Stirling, \email{stirling.tamas@@gmail.com}
#' @examples
#' # might fail if API is not available
#' \donttest{
Expand Down
1 change: 0 additions & 1 deletion R/srs.R
Expand Up @@ -13,7 +13,6 @@
#' categoryClass, kingdomCode, iupacName, pubChemId, molecularWeight,
#' molecularFormula, inchiNotation, smilesNotation, classifications,
#' characteristics, synonyms, casNumbers, taxonomicSerialNumbers, relationships
#'@author Gordon Getzinger, \email{gjg3@@duke.edu}
#'@export
#'
#' @examples
Expand Down
8 changes: 0 additions & 8 deletions R/utils.R
Expand Up @@ -22,7 +22,6 @@
#' Ralf B. Schäfer (2020). webchem: An R Package to Retrieve Chemical
#' Information from the Web. Journal of Statistical Software, 93(13).
#' <doi:10.18637/jss.v093.i13>.
#' @author Eduard Szöcs, \email{eduardszoecs@@gmail.com}
#' @export
#' @examples
#' is.inchikey('BQJCRHHNABKAKU-KBQPJGBKSA-N')
Expand Down Expand Up @@ -53,7 +52,6 @@ is.inchikey = function(x, type = c('format', 'chemspider'), verbose = TRUE) {
#' @return a logical
#'
#' @seealso \code{\link{is.inchikey}} for a pure-R implementation.
#' @author Eduard Szöcs, \email{eduardszoecs@@gmail.com}
#' @export
#' @examples
#' \donttest{
Expand Down Expand Up @@ -118,7 +116,6 @@ is.inchikey_cs <- function(x, verbose = TRUE){
#' @return a logical
#'
#' @seealso \code{\link{is.inchikey}} for a pure-R implementation.
#' @author Eduard Szöcs, \email{eduardszoecs@@gmail.com}
#' @export
#' @examples
#' \donttest{
Expand Down Expand Up @@ -194,7 +191,6 @@ is.inchikey_format = function(x, verbose = TRUE) {
#' Ralf B. Schäfer (2020). webchem: An R Package to Retrieve Chemical
#' Information from the Web. Journal of Statistical Software, 93(13).
#' <doi:10.18637/jss.v093.i13>.
#' @author Eduard Szöcs, \email{eduardszoecs@@gmail.com}
#'
#' @export
#' @examples
Expand Down Expand Up @@ -275,8 +271,6 @@ is.cas <- function(x, verbose = TRUE) {
#'
#' @note This function can handle only one SMILES string.
#'
#' @author Eduard Szöcs, \email{eduardszoecs@@gmail.com}
#'
#' @references Egon Willighagen (2015). How to test SMILES strings in
#' Supplementary Information.
#' \url{https://chem-bla-ics.blogspot.nl/2015/10/how-to-test-smiles-strings-in.html}
Expand Down Expand Up @@ -339,7 +333,6 @@ extr_num <- function(x) {
#' 1 = first atom, 2 = second atom, t = bond type, s = stereo type, x = not
#' used, r = bond typology, c = reacting center status.
#'
#' @author Eduard Szöcs, \email{eduardszoecs@@gmail.com}
#' @references Grabner, M., Varmuza, K., & Dehmer, M. (2012). RMol:
#' a toolset for transforming SD/Molfile structure information into R objects.
#' Source Code for Biology and Medicine, 7, 12.
Expand Down Expand Up @@ -383,7 +376,6 @@ parse_mol <- function(string) {
#' @return character vector of valid CAS numbers
#' @seealso \code{\link{is.cas}}
#' @export
#' @author Eric Scott, \email{scottericr@@gmail.com}
#' @examples
#' x = c(58082, 123456, "hexenol")
#' as.cas(x)
Expand Down

0 comments on commit 6433e7e

Please sign in to comment.