Skip to content

get.synonyms not returning data #1

@cbroeckl

Description

@cbroeckl

I tried to use 'get.synonyms' to retreive chemical descriptions. My favorite test case:

rpubchem::get.synonyms(name = 'caffeine', quiet = FALSE)
data frame with 0 columns and 0 rows

I went into the function and found that the created 'url' was valid and had many synonyms. the 'out' object was also full of synonyms. The only thing I had to change was to change the last line from:

out

to:

return(out)

and the function now works to return the data.frame successfully.

sessionInfo()
R version 3.6.1 (2019-07-05)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 17134)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C LC_TIME=English_United States.1252

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] data.table_1.12.6 XML_3.98-1.20 RCurl_1.95-4.12 bitops_1.0-6

loaded via a namespace (and not attached):
[1] zip_2.0.4 Rcpp_1.0.2 pillar_1.4.2 compiler_3.6.1 cellranger_1.1.0 forcats_0.4.0 base64enc_0.1-3
[8] iterators_1.0.12 tools_3.6.1 zeallot_0.1.0 tibble_2.1.3 pkgconfig_2.0.3 rlang_0.4.1 openxlsx_4.1.2
[15] rstudioapi_0.10 curl_4.2 parallel_3.6.1 haven_2.1.1 rio_0.5.16 stringr_1.4.0 vctrs_0.2.0
[22] hms_0.5.2 readxl_1.3.1 rpubchem_1.5.10 foreign_0.8-71 RJSONIO_1.3-1.3 carData_3.0-2 car_3.0-4
[29] magrittr_1.5 backports_1.1.5 itertools_0.1-3 abind_1.4-5 fingerprint_3.5.7 stringi_1.4.3 crayon_1.3.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions